
14 Dec
2006
14 Dec
'06
2:42 a.m.
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.