From: Daniel Frey (d.frey_at_[hidden])
Date: 2008-04-22 04:43:07
On Tue, 2008-04-22 at 01:54 +0300, Peter Dimov wrote:
> Your patch (still) contains a number of changes, some of which are unrelated
> to its purpose (to save one pointer in esft). To break it down:
OK, so let's separate them. For now, I'll skip 1 and 2.
> 4. Adds if( tmp != pi_ ) optimizations. OK, but a separate issue.
Committed to svn.
> 5. Adds shared_ptr(shared_count, p). OK, essential. The && overload is not
> guarded, BTW.
I assume by "guarded" you mean "protected by #ifdef
BOOST_HAS_RVALUE_REFS"? It actually is guarded then, although it might
not be visible from looking at the patch itself, since I added it to the
section with the other move semantic ctors.
> 6. Adds _internal_shared_count. OK, essential. Should probably be called
Do you suggest to make it a part of the public interface?
This would allow another, very explicit approach to have an aliasing
shared_ptr<T> t = ...;
U* pu = ...;
shared_ptr<U> u( t.get_shared_count(), pu ); // aliasing
Which /could/ replace the existing aliasing ctor - except that this is
again a breaking change. But OK, that's independent of renaming it to
> You may commit #4 right away; as for the rest, I'd really like to see the
> patch without #1 and #2.
OK, I'll prepare it after work.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk