Boost logo

Boost Users :

From: gfsdjkgf_at_[hidden]
Date: 2008-05-14 14:58:59


>
> Wrap Handler in boost::protect. For lambda use boost::lambda::protect
>
> bind(&Test2<Handler_t>, boost::protect(Handler))();
>
>
Sorry, but this does not work.

1>d:\projekte\libs\boost_1_35\build\x86\include\boost-1_35\boost\bind.hpp(232) : error C2664: 'void (Handler_t)' : cannot convert parameter 1 from 'boost::_bi::protected_bind_t<F>' to 'boost::_bi::bind_t<R,F,L>'
1> with
1> [
1> Handler_t=boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>
1> ]
1> and
1> [
1> F=boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>
1> ]
1> and
1> [
1> R=void,
1> F=void (__cdecl *)(int),
1> L=boost::_bi::list1<boost::_bi::value<int>>
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> d:\projekte\libs\boost_1_35\build\x86\include\boost-1_35\boost\bind\bind_template.hpp(20) : see reference to function template instantiation 'void boost::_bi::list1<A1>::operator ()<void(__cdecl *)(Handler_t),boost::_bi::list0>(boost::_bi::type<T>,F &,A &,int)' being compiled
1> with
1> [
1> A1=boost::_bi::value<boost::_bi::protected_bind_t<boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>>>,
1> Handler_t=boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>,
1> T=void,
1> F=void (__cdecl *)(boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>),
1> A=boost::_bi::list0
1> ]
1> d:\projekte\libs\boost_1_35\build\x86\include\boost-1_35\boost\bind\bind_template.hpp(18) : while compiling class template member function 'void boost::_bi::bind_t<R,F,L>::operator ()(void)'
1> with
1> [
1> R=void,
1> F=void (__cdecl *)(boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>),
1> L=boost::_bi::list1<boost::_bi::value<boost::_bi::protected_bind_t<boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>>>>
1> ]
1> d:\projekte\test2\main.cpp(14) : see reference to class template instantiation 'boost::_bi::bind_t<R,F,L>' being compiled
1> with
1> [
1> R=void,
1> F=void (__cdecl *)(boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>),
1> L=boost::_bi::list1<boost::_bi::value<boost::_bi::protected_bind_t<boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>>>>
1> ]
1> d:\projekte\test2\main.cpp(23) : see reference to function template instantiation 'void Test1<boost::_bi::bind_t<R,F,L>>(Handler_t)' being compiled
1> with
1> [
1> R=void,
1> F=void (__cdecl *)(int),
1> L=boost::_bi::list1<boost::_bi::value<int>>,
1> Handler_t=boost::_bi::bind_t<void,void (__cdecl *)(int),boost::_bi::list1<boost::_bi::value<int>>>
1> ]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net