Boost logo

Boost :

From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2008-03-14 04:42:50


Hello,

> The private member function I'm binding is being passed into
> Boost.Signalslibrary, and that is where the function object is being
> evoked. Perhaps that
> is the issue? The function bound by Boost.Bind() is being evoked outside
> of
> the scope of the owning class. Perhaps Boost.Signals needs to be a friend?

Nope, the error can't be there. I make a strong use of bind on private
member functions, together with Boost.Signals or Boost.Function. It works
perfectly and is a great way to have a class encapsulate its methods while
allowing punctual access for a precise purpose.

When I get into work tomorrow I'll give you an exact compiler error message,
> if you require it. The compiler error itself wasn't at all helpful, it was
> simply my assumption that binding a private member function to
> boost.bindwasn't going to work.

In this case, did you try to make it public and see if the error disappears?
In my opinion, it won't.

Bruno


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk