
16 Apr
2008
16 Apr
'08
9:22 p.m.
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.