[bind+signals] binding overloaded function + gcc4.6.2 = call of overloaded is ambiguous
Hi all, Such code can be built without problem using gcc3.4.3: typedef boost::signal< void () > Signal; Signal s; boost::bind( &Signal::operator(), &s ); but gcc4.6.2 returns: error: call of overloaded 'bind(<unresolved overloaded function type>, Signal*)' is ambiguous Is it expected behaviour? or problem in gcc4.6.2? Is there any solution except casting function pointer to particular type? Regards, Bogdan PS. I tried boost 1.38/1.48 and gcc 3.4.3/4.6.2
On 11/25/2011 3:13 PM, Bogdan Slusarczyk wrote:
Hi all, Such code can be built without problem using gcc3.4.3:
typedef boost::signal< void () > Signal; Signal s; boost::bind( &Signal::operator(), &s );
but gcc4.6.2 returns:
error: call of overloaded 'bind(<unresolved overloaded function type>, Signal*)' is ambiguous
Is it expected behaviour? or problem in gcc4.6.2? Is there any solution except casting function pointer to particular type?
You could use boost::bind(boost::apply<void>(), boost::ref(s));
participants (2)
-
Bogdan Slusarczyk
-
Sergiu Dotenco