diff --git a/include/boost/smart_ptr/intrusive_ptr.hpp b/include/boost/smart_ptr/intrusive_ptr.hpp index 6927a59..0e30ece 100644 --- a/include/boost/smart_ptr/intrusive_ptr.hpp +++ b/include/boost/smart_ptr/intrusive_ptr.hpp @@ -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; } diff --git a/include/boost/smart_ptr/shared_ptr.hpp b/include/boost/smart_ptr/shared_ptr.hpp index 1b367f0..8256d00 100644 --- a/include/boost/smart_ptr/shared_ptr.hpp +++ b/include/boost/smart_ptr/shared_ptr.hpp @@ -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 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; } diff --git a/include/boost/smart_ptr/weak_ptr.hpp b/include/boost/smart_ptr/weak_ptr.hpp index 621c433..8690cca 100644 --- a/include/boost/smart_ptr/weak_ptr.hpp +++ b/include/boost/smart_ptr/weak_ptr.hpp @@ -86,13 +86,13 @@ public: weak_ptr( weak_ptr && 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 - weak_ptr & operator=(weak_ptr && r) + weak_ptr & operator=( weak_ptr && r ) { - this_type( std::move( r ) ).swap( *this ); + this_type( static_cast< weak_ptr && >( r ) ).swap( *this ); return *this; }