
27 Oct
2009
27 Oct
'09
10:12 p.m.
Peter Dimov wrote:
Before fixing it, can you please show me a test case that fails?
I get it. I haven't read Berserker's tests carefully (sorry), and our tests do indeed not cover this case. Either ~enable_shared_from_this2 should be made virtual and (T*)0 be made a dynamic_cast<T*>(this) as in the original, or shared_from_this should be a free function, as you suggest. (How about 'shared_from_raw' as a name for the free function?)