Merge branch 'move-alias' of https://github.com/uecasm/smart_ptr into develop

This commit is contained in:
Peter Dimov
2016-04-13 13:29:50 +03:00
4 changed files with 126 additions and 0 deletions

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 )