Boost logo

Boost Users :

From: Nat Goodspeed (nat_at_[hidden])
Date: 2008-02-06 14:56:17


Robert Dailey wrote:

> template< InputSubscription t_sub >
> static void subscribe( SignalBank const& bank, typename
> GetSignal<t_sub>::signal::slot_type& slot )
> {
> using boost::fusion::at_c;
> at_c<t_sub>( bank.signals ).connect( slot );
> }
>
> void footest()
> {
> subscribe<INPUTSUB_MOUSE_MOTION>( bank, &mouseCB );
> };
>
> Notice that I have a wrapper function, 'subscribe', which uses the slot_type
> member of the signals class to pass the slot to the connect() function.

Try making that 'const ...::slot_type&' instead?


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