
26 Apr
2008
26 Apr
'08
5:20 p.m.
On Saturday 26 April 2008 12:34, Daniel Frey wrote:
OK, understood. The attached version should behave as expected and passes all regression tests. It requires weak_count.empty().
One minor tweak, init_weak_once doesn't seem to need two if statements: void init_weak_once() const { if( _weak_count.empty() ) { detail::shared_count( (void*)0, detail::sp_deleter_wrapper() ).swap( _shared_count ); _weak_count = _shared_count; } } -- Frank