|
Boost Users : |
From: Staal, J.J. \(Joes\) (joes.staal_at_[hidden])
Date: 2005-07-07 04:01:19
In the docs for signals, an example is given for disconnecting slots:
void foo();
void bar();
signal<void()> sig;
sig.connect(&foo);
sig.connect(&bar);
// disconnects foo, but not bar
sig.disconnect(&foo);
When I try this with MSV 7.1, I get an compiler error:
error C2664:
'boost::signal0<R,Combiner,Group,GroupCompare,SlotFunction>::disconnect'
:
cannot convert parameter 1 from 'void (__cdecl *)(void)' to 'const
boost::signal0<R,Combiner,Group,GroupCompare,SlotFunction>::group_type
&'
with
[
R=boost::detail::function_traits_helper<boost::add_pointer<void
(void)>::type>::result_type,
Combiner=boost::last_value<void>,
Group=int,
GroupCompare=std::less<int>,
SlotFunction=boost::function<void (void)>
]
and
[
R=boost::detail::function_traits_helper<boost::add_pointer<void
(void)>::type>::result_type,
Combiner=boost::last_value<void>,
Group=int,
GroupCompare=std::less<int>,
SlotFunction=boost::function<void (void)>
]
My question is, are the docs incorrect, or am I doing something wrong?
Regards,
Joes.
This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html
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