On 16/07/2012 02:11, Kjell Ahlstedt wrote:
>>
>>
> Thanks.
> I haven't tested it (and will probably not do it) but it seems quite 
> reasonable.
> I suppose it will also require some calls to BOOST_TYPEOF_REGISTER_TEMPLATE.

No it doesn't. Here's my full test-case:
//-------------------------------
#include <iostream>
#include <boost/type_traits.hpp>
#include <sigc++/sigc++.h>

namespace sigc
{
    template <typename Functor>
    struct functor_trait<Functor, false>
    {
        typedef BOOST_TYPEOF_TPL (sigc::mem_fun
                                  (boost::declval<Functor&> (),
                                   &Functor::operator())) _intermediate;


        typedef typename _intermediate::result_type result_type;
        typedef Functor functor_type;
    };
}


struct Foo
{
    bool operator() ()
    {
        std::cout << "Hello world!" << std::endl;
    }
};

int main ()
{
    sigc::slot<bool> slot = Foo ();
    slot ();

    return 0;
}
//-------------------------------

-- 
Kind regards,
Loong Jin



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libsigc-list mailing list
libsigc-list@gnome.org
https://mail.gnome.org/mailman/listinfo/libsigc-list

Reply via email to