$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-01-23 14:40:04
Marc VIALA wrote:
> Thanks for your help, but...
> 
> boost::function<void (void)> pg = boost::bind((void(X::*)(int,int))&X::g,
> &x, a, b) ;
> 
> Oups, with the correction same result, compilation failed, but not with 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