Boost logo

Boost Users :

Subject: Re: [Boost-users] bind member function of a member of a class...
From: Alan M. Carroll (amc_at_[hidden])
Date: 2009-03-04 20:37:14


Clearly I responded a bit too quickly.

You can't use B::getA::test because there is no such function. There is only B::getA and A::value. Without bind, it would not be b.getA::value(), but b.getA().value(). Note this is *two* method invocations. Therefore you must have *two* calls to Bind to create a functor that performs *two* method invocations.
       bind(&A::value, bind(&B::getA, _1)) == 1

Sorry for the confusion, I read what I meant, not what you wrote.

At 05:52 PM 3/4/2009, you wrote:
> boost::bind (&B::getA::value, _1)() == 1);


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