"Peter Dimov" <[EMAIL PROTECTED]> writes: > From: "David Abrahams" <[EMAIL PROTECTED]> >> > I haven't encountered a need to inspect the deleter yet... what > interface >> > are you suggesting? >> >> How about: >> >> // attempt to extract a deleter of type D >> D* d = boost::get_deleter<D>(p); >> if (d) >> { >> // that was the deleter type used. >> } > > BTW, the deleter is not required to have an address. For example, the > current shared_ptr implementation can easily be made to optimize out > checked_deleter<Y> instances.
Okay then: bool found = boost::has_deleter<D>(p); if (found) { D& d = boost::get_deleter<D>(p); } -- 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