
AMDG Zachary Turner wrote:
<snip>
void client::start_work() { apply_visitor( bind(do_work_visitor(), _1, protect(bind(&client::work_finished, this, _1, _2))) , work_variant_); } <snip>
template<class Handler> void async_do_work(Handler h) { //impl supports the same basic interface as worker
impl->async_do_work( bind(&worker::intercept_handler<Handler>, this, h, _1, _2)); }
Since h is a bind expression it needs to be protect'ed.
<snip> However this doesn't work. I've also tried protect(bind in the async_do_work function and that doesn't work either. Is it supposed to be possible to nest binds arbitrarily deep or is this just a limitation? Or am I just doing it wrong?
In Christ, Steven Watanabe