I am trying to use automatic connection management and changing the mutex type of a signal for a template function.
The following code compiles and executes fine usi
I examined the code, but couldn't find the immediate cause of the error.
By once assigning &Simple::proxy
to equivalent variable as the following,
VC compiled the code somehow:
template < typename F, typename ST, typename A1 >
boost::signals2::connection connectAutoMgmt( F f, ST st, A1 a1 ) {
void (Simple::*p)( F, ST, int ) = &Simple::proxy;
return sig.connect( sig_type::slot_type( p, .... ).track( st ) );
}
void init() {
....
void (Simple::*p)(
void(Simple::*)(int), boost::shared_ptr< Simple >, int ) =
&Simple::proxy;
boost::signals2::connection c2 = sig.connect(
sig_type::slot_type( p, .... ).track( s2 ) );
....
However, I cannot figure out why the above changes have an effect. Honestly I suspect VC's bug at the moment... Anyway, hope this helps.