|
Boost Users : |
From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2008-08-07 10:00:06
On Thu, Aug 7, 2008 at 2:51 PM, Alejandro Martinez <elpeque2_at_[hidden]> wrote:
> After i define a boost::function using bind to a member function of some
> signature...
>
> Can i change the instance to have as "this" in such function for another of
> the same type? Maybe pass it as a parameter at call time?
>
> Thanks a lot for your time :)
Try
boost::bind(&YourClass::YourMethod, _1, <rest of parameters>)
That will create a boost::function whose first parameter will be used
as 'this' in hte method call.
HTH
Stuart Dootson
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