Boost logo

Boost :

Subject: Re: [boost] scoped_ptr deleter
From: Berserker (berserker_r_at_[hidden])
Date: 2009-09-15 09:26:19


Stewart, Robert wrote:
> That change creates multiple, distinct classes.
> shared_ptr<T,boost::checked_deleter<T>> is not the same as shared_ptr<T,my_deleter<T>>.
> By embedding the deleter in the shared_ptr with type erasure,
> shared_ptr<T> is shared_ptr<T> is shared_ptr<T>, regardless of the deleter.

Sure and that's the point :)
As I wrote, since the "noncopyable nature" of scoped_ptr (shared_ptr is copiable by design), the creation of distinct classes isn't a problem. I think that the "real problem" here is to provide a solution that doesn't require extra memory overhead.
_________________________________________________________________
Gossip, Sport, Notizie... Accendi la Messenger TV!
http://www.messenger.it/messengerTV.aspx


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