|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-11 18:10:33
Daniel Frey:
> I attached a complete implementation of enable_shared_from_this_light
> which has an overhead of a single plain pointer. [...]
I agree that providing the ability to build this lightweight helper may be
valuable to some. But I'm not sure that we should provide several esft
classes in Boost (except possibly as examples). This of course raises the
question of which esft base (of the three candidates we have) should be
provided.
> The thing to note is that I added two more things to
> shared_ptr: _internal_shared_count() and a ctor which takes a
> detail::weak_count and the raw pointer.
I'd change the first argument of the new constructor to
detail::shared_count.
I don't like your preferred spelling of the function. It doesn't reflect its
semantics in my opinion. In shared_ptr<T> p( new T ), the T object is not an
observer, but it does accept p as its owner.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk