Subject: Re: [boost] enable_shared_from_this2
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-10-27 17:53:14
Frank Mori Hess wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On Tuesday 27 October 2009, Peter Dimov wrote:
>> Frank Mori Hess wrote:
>>> The version currently in svn looks broken, ...
>> It passes esft_constructor_test, which you wrote. :-)
> I can fix that :) It looks like I only did tests of ownership, I
> never tested the actual pointer value that was returned. I think I
> can fix enable_shared_from_this2.hpp tommorrow, would it be okay for
> me to commit changes to it to trunk?
Before fixing it, can you please show me a test case that fails?
shared_from_this_test.cpp also seems to work when switched to esft2 (a test
that I should have added, but didn't, for some reason). Do you see anything
The missing #include <boost/weak_ptr.hpp> doesn't count. ;-)
FWIW, I do not object in principle if you decide to
> go the path of a non-template enable_shared_from_this2 with a free
> shared_from_this() function;
it's just that the current esft2 was supposed to be a faithful
reconstruction of your constructor-enabled esft (minus the get_deleter
special case to keep shared_ptr unaware of it).