Added shared_ptr aliasing move constructor.

Signed-off-by: Gavin Lambert <github@mirality.co.nz>
This commit is contained in:
Gavin Lambert
2015-10-12 18:19:22 +13:00
parent df90496583
commit 05d5a4e9a0
4 changed files with 126 additions and 0 deletions
+8
View File
@@ -642,6 +642,14 @@ public:
return *this;
}
// aliasing move
template<class Y>
shared_ptr( shared_ptr<Y> && r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn()
{
pn.swap( r.pn );
r.px = 0;
}
#endif
#if !defined( BOOST_NO_CXX11_NULLPTR )