"Peter Dimov" <[EMAIL PROTECTED]> writes: > From: "David Abrahams" <[EMAIL PROTECTED]> > >> I realize my case is somewhat unusual. I can't really argue that it >> warrants publicizing deleter introspection for >> everybody... however, since we're all part of a big happy Boost >> family and I /could/ always switch to a map if the shared_ptr >> implementation changes, how bad would it be for me to use my hack? > > There isn't anything bad. What I really ask is your opinion on > whether get_deleter<> should be proposed for the TR, i.e. whether > the technique of storing private data in shared_ptr deleters and > then getting it back when you happen to encounter one of your > shared_ptrs is of general utility, considering that a general > alternative (map<weak_ptr<void>, Data>) exists.
I think that considering the alternatives require: 1. Periodic map sweeps (we might as well be doing GC ;->), or 2. Solving the constructor forwarding problem for tacking on additional data to the pointed-to class IMO it's worth giving serious consideration to deleter introspection. It seems like a fairly general class of problem to want to find out the actual resource that is being managed by a given shared_ptr. -Dave -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost