Boost logo

Boost Users :

Subject: Re: [Boost-users] multiple levels of bind nesting
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-07-23 02:55:48


Zachary Turner wrote:

[snip]
> Yes I tried that as well but was not able to get it working.
[snip]

I managed to get something similar working, by making the protected type
explicit. Please see the code snippet below.

Kind regards,

Rutger

template< typename Something >
class some_class {

typedef some_class<Something> this_type;

template< typename Handler >
void func_a( ..., Handler handler ) {
 async_something( ..., boost::bind( &this_type::template func_b<
      boost::_bi::protected_bind_t<Handler> >,
      this, ..., boost::protect(handler) ) );
}

template < typename Handler >
void func_b( ..., Handler ) {

}

};


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