|
Boost Users : |
Subject: Re: [Boost-users] [bind+signals] binding overloaded function + gcc4.6.2 = call of overloaded is ambiguous
From: Sergiu Dotenco (sergiu.dotenco_at_[hidden])
Date: 2011-11-25 10:38:53
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));
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