
26 Apr
2008
26 Apr
'08
2:47 p.m.
On Sat, 2008-04-26 at 16:48 +0300, Peter Dimov wrote:
Daniel Frey:
I refactored enable_shared_from_this in order to remove the _owner flag.
There's another problem with your new implementation, one that wasn't caught by esft_regtest (I updated it to catch it):
void test4() { boost::shared_ptr<V> pv( new V ); boost::shared_ptr<V> pv2( pv.get(), null_deleter() ); }
Your implementation modifies pv2.
The attached version should fix that. It also passes test5() - unlike the current trunk version which uses _owner. FWIW, it still fails to pass the esft_constructor_test.cpp, line 131. Regards, Daniel