Thanks for your help, but...
boost::function
pg = boost::bind((void(X::*)(int,int))&X::g, &x, a, b) ; Oups, with the correction same result, compilation failed, but not with
Thanks a lot... and I'm sorry to have not seen the args mismatch in your first mail. With this explicit cast, the bind function compiles. Thanks for your help. Marc Viala mailto:mviala@acticm.com -----Message d'origine----- De : boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] De la part de Rene Rivera Envoyé : lundi 23 janvier 2006 20:40 À : boost-users@lists.boost.org Objet : Re: [Boost-users] [Boost][Bind] How to bind template function member Marc VIALA wrote: the
same first message error: " can't convert 'overloaded-function' in 'void (__thiscall X::* )(int,int)' " now?
Oops, I read you example more clearly now. The arg types don't match, it should be a cast to (void (X::*)(int&,int&)).
Could you give some feedbacks about the reason of the compilation failure? Is this due to some restrictions on VC++ 7.1?
I'm not sure where the restriction is, just that it works. I think VC8 handles the specialization syntax correctly. Be gald you are only getting a compile error. I tried doing something slightly more complicated recently and got an ICE with VC71, but not with VC8. Doing the cast gives the compiler the context it needs to decide on which overload to use. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users