Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users][bind, lambda, ...] binding unused actual parameter
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-04-16 07:39:55


2009/4/16 Roman Perepelitsa <roman.perepelitsa_at_[hidden]>

> If you don't want or can't overload get_pointer, you can use double bind
> trick.
>
> CComPtr<ThisObj> self(this);
> asyncSubsystem_->doSomething(bind(bind(&ThisObj::handler, this), self));
>

Sorry, you'll also need a protect.

  asyncSubsystem_->doSomething(bind(protect(bind(&ThisObj::handler, this)),
self));

Roman Perepelitsa.



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