Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-12-13 21:42:33


Theodore Witkamp wrote:

> I have my own non-boost smart pointers and function objects and i can
> call Func<>.isNull()
> on them and it does what I want. However I long for the convenience
> of bind. So I am left with a dilemma should I add more functionality
> to Func or add what I need to boost::function.

boost::bind supports visit_each so you can find your weak pointer and test
it for NULL, but you'll have to add this check to boost::function.
boost::signal uses visit_each to peek inside bind and discover "trackable"
pointers, but it seems to use its own logic for that, boost::function hasn't
been modified to call visit_each.


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