|
Boost : |
From: Daniel Frey (d.frey_at_[hidden])
Date: 2008-04-12 21:58:56
On Sun, 2008-04-13 at 03:53 +0300, Peter Dimov wrote:
> Daniel Frey:
> > If passing the type of the deleter itself is really needed, it can be done
> > without overhead, e.g. pass (D*)0.
>
> This would be letting the implementation drive the interface. Not a good
> idea in general, unless the interface is inherently inefficient. It isn't.
I agree that the implementation should not drive the interface, but I
still fail to see why passing the deleter should be needed anyway. It's
not even used in the current enable_shared_from_this implementation, so
why do you think that it should be part of sp_accept_owner's interface?
I attached an updated patch against HEAD (r44358), which is shorter now
that the sp_accept_owner-changes are applied to HEAD. Please have a
look. If you ignore enable_shared_from_this_light.hpp and
bad_shared_from_this.hpp, the rest is not that big...
Regards, Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk