Merge [57957] to release. Fixes #3570.

[SVN r58067]
This commit is contained in:
Peter Dimov
2009-11-30 20:34:39 +00:00
parent 4f5062004a
commit b0fd8a6b08
3 changed files with 8 additions and 8 deletions

View File

@ -122,7 +122,7 @@ public:
intrusive_ptr & operator=(intrusive_ptr && rhs)
{
this_type(std::move(rhs)).swap(*this);
this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this);
return *this;
}

View File

@ -368,14 +368,14 @@ public:
shared_ptr & operator=( shared_ptr && r ) // never throws
{
this_type( std::move( r ) ).swap( *this );
this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
return *this;
}
template<class Y>
shared_ptr & operator=( shared_ptr<Y> && r ) // never throws
{
this_type( std::move( r ) ).swap( *this );
this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
return *this;
}

View File

@ -86,13 +86,13 @@ public:
weak_ptr( weak_ptr<Y> && r )
#endif
: px(r.lock().get()), pn(std::move(r.pn)) // never throws
: px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws
{
r.px = 0;
}
// for better efficiency in the T == Y case
weak_ptr( weak_ptr && r ): px( r.px ), pn(std::move(r.pn)) // never throws
weak_ptr( weak_ptr && r ): px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws
{
r.px = 0;
}
@ -100,7 +100,7 @@ public:
// for better efficiency in the T == Y case
weak_ptr & operator=( weak_ptr && r ) // never throws
{
this_type( std::move( r ) ).swap( *this );
this_type( static_cast< weak_ptr && >( r ) ).swap( *this );
return *this;
}
@ -134,9 +134,9 @@ public:
#if defined( BOOST_HAS_RVALUE_REFS )
template<class Y>
weak_ptr & operator=(weak_ptr<Y> && r)
weak_ptr & operator=( weak_ptr<Y> && r )
{
this_type( std::move( r ) ).swap( *this );
this_type( static_cast< weak_ptr<Y> && >( r ) ).swap( *this );
return *this;
}