Merge [51909], [51912], [52937], [53672] to release.

[SVN r55479]
This commit is contained in:
Peter Dimov
2009-08-08 23:21:15 +00:00
parent 8a421c2098
commit 63b17c24ea
11 changed files with 710 additions and 13 deletions

View File

@@ -61,6 +61,7 @@ namespace boost
template<class T> class shared_ptr;
template<class T> class weak_ptr;
template<class T> class enable_shared_from_this;
template<class T> class enable_shared_from_this2;
namespace detail
{
@@ -109,6 +110,14 @@ template< class X, class Y, class T > inline void sp_enable_shared_from_this( bo
}
}
template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe )
{
if( pe != 0 )
{
pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );
}
}
#ifdef _MANAGED
// Avoid C4793, ... causes native code generation
@@ -359,14 +368,14 @@ public:
shared_ptr & operator=( shared_ptr && r ) // never throws
{
this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
this_type( std::move( r ) ).swap( *this );
return *this;
}
template<class Y>
shared_ptr & operator=( shared_ptr<Y> && r ) // never throws
{
this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
this_type( std::move( r ) ).swap( *this );
return *this;
}