Boost logo

Boost Users :

From: Jeff Williams (jwilliams_at_[hidden])
Date: 2004-08-02 13:06:54


What is the prefered method of creating a boost::function<void()>, via boost bind, that is calling a member function of a class, and that class instance is held inside the bind object as a weak ptr.

Thus, when the function is called, it will try to lock the shared_ptr, if successful it calls the bound function, otherwise it does nothing.

Is there an standard way of doing this? Or do I have to write my own custom intermediate function? (which is how I do it now).

Jeff


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