|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-16 17:22:11
Daniel Frey:
...
> template< typename U >
> shared_ptr<U> shared_from_this( U* u );
This would even allow you to drop the template parameter of esft_light.
Interesting.
Getting back to your proposed changes, I unfortunately can't think of a
mutually satisfactory way to integrate them. I don't like
shared_ptr( shared_count & pn, Y* px );
because it moves from the lvalue pn, auto_ptr style. The proper interface
wouldn't do that; it would copy from lvalues and move from rvalues by
default, while still providing an explicit way to move from lvalues.
On the other hand, the safe C++03 approximation of the proper interface is
inefficient, and I don't want to introduce move semantics emulation just for
that semi-internal constructor.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk