-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 17 February 2009, Nat Goodspeed wrote:
Nat Goodspeed wrote:
I want my visitor to detect a bound boost::shared_ptr<anything> and pass the shared_ptr to my new slot_type object's track() method.
Frank, that functionality isn't specific to either boost::trackable or my own Trackable base class. Supposing we can resolve the problem of a bound copy of a shared_ptr (previous message in thread), couldn't the Signals2 library incorporate that logic itself?
I don't view the "dynamically replace bound shared_ptr with weak_ptr in
incoming bind functor" idea as viable. But if you mean the general feature
of searching for some base class during connect and automatically tracking
those objects, that might get added in the future. I would do it strictly as
an optional extension though, in seperate headers and only using the
library's existing public interfaces. It would add a free function findable
by ADL that would look for the trackable base class when connecting,
something like:
class shared_trackable: public enable_shared_from_this