Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-11-17 10:01:30


From: "David Abrahams" <dave_at_[hidden]>
> > 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.


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