Boost logo

Boost Users :

From: Boris (boriss_at_[hidden])
Date: 2007-07-02 06:57:55


On Thu, 07 Jun 2007 09:34:32 +0900, Douglas Gregor <doug.gregor_at_[hidden]>
wrote:

> [...]
>>>> void Hello() { }
>>>> boost::signal<void ()> sig;
>>>> sig.connect(&Hello); // OK
>>>> sig.disconnect(&Hello); // Error
>>> [...]http://www.boost.org/doc/html/signals/tutorial.html#id1627590
>>
>> According to http://www.boost.org/doc/html/signals/
>> tutorial.html#id1627841
>> the code above should work? However I can't compile it with VC++
>> 2005 SP1.
>> Anyone with the same problem? The error message I get is:
>
> The code supporting this feature was accidentally disabled for VC++
> in Boost 1.33.1. This oversight was fixed in Boost 1.34.0.

Doug, I upgraded now to Boost 1.34.0 only to run into another problem with
Boost.Signal:

C:\Boost\include\boost-1_34\boost/signals/signal_template.hpp(242) : error
C2666: 'boost::operator ==' : 4 overloads have similar conversions
         C:\Boost\include\boost-1_34\boost/function/function_template.hpp(699):
could be 'void boost::operator ==<R,T0,Allocator>(const
boost::function1<R,T0,Allocator> &,const boost::function1<R,T0,Allocator>
&)'
        [...]
         C:\Boost\include\boost-1_34\boost/function/function_base.hpp(647):
or 'bool boost::operator ==<boost::function<Signature>>(Functor,const
boost::function_base &)'
        [...]
         C:\Boost\include\boost-1_34\boost/function/function_base.hpp(638):
or 'bool boost::operator ==<Function>(const boost::function_base
&,Functor)'
        [...]
         or 'built-in C++ operator==(void (__thiscall
boost::function1<R,T0,Allocator>::dummy::* )(void), void (__thiscall
boost::function1<R,T0,Allocator>::dummy::* )(void))'
        [...]
         while trying to match the argument list
'(boost::function<Signature>, const boost::function<Signature>)'
        [...]
         C:\Boost\include\boost-1_34\boost/signals/signal_template.hpp(224)
: see reference to function template instantiation 'void
boost::signal1<R,T1,Combiner,Group,GroupCompare,SlotFunction>::do_disconnect<T>(const
Function &,boost::mpl::bool_<C_>)' being compiled
        [...]

If required I can copy&paste the full error message (I only dropped the
template parameters for better readability). Is this a known problem?
Anything I can do about it?

Boris


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