forked from boostorg/smart_ptr
Remove uses of BOOST_NO_CXX11_RVALUE_REFERENCES
This commit is contained in:
@@ -189,8 +189,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template<class Y> local_shared_ptr( shared_ptr<Y> && r,
|
||||
typename boost::detail::sp_enable_if_convertible<Y, T>::type = boost::detail::sp_empty() )
|
||||
: px( r.get() ), pn( 0 )
|
||||
@@ -204,12 +202,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// construction from unique_ptr
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template< class Y, class D >
|
||||
local_shared_ptr( std::unique_ptr< Y, D > && r,
|
||||
typename boost::detail::sp_enable_if_convertible<Y, T>::type = boost::detail::sp_empty() )
|
||||
@@ -223,8 +217,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template< class Y, class D >
|
||||
local_shared_ptr( boost::movelib::unique_ptr< Y, D > r ); // !
|
||||
// : px( r.get() ), pn( new boost::detail::local_counted_impl( shared_ptr<T>( std::move(r) ) ) )
|
||||
@@ -244,16 +236,12 @@ public:
|
||||
|
||||
// move constructor
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
local_shared_ptr( local_shared_ptr && r ) BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
|
||||
{
|
||||
r.px = 0;
|
||||
r.pn = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// converting copy constructor
|
||||
|
||||
template<class Y> local_shared_ptr( local_shared_ptr<Y> const & r,
|
||||
@@ -270,8 +258,6 @@ public:
|
||||
|
||||
// converting move constructor
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template<class Y> local_shared_ptr( local_shared_ptr<Y> && r,
|
||||
typename boost::detail::sp_enable_if_convertible<Y, T>::type = boost::detail::sp_empty() ) BOOST_SP_NOEXCEPT
|
||||
: px( r.px ), pn( r.pn )
|
||||
@@ -282,8 +268,6 @@ public:
|
||||
r.pn = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// aliasing
|
||||
|
||||
template<class Y>
|
||||
@@ -295,8 +279,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template<class Y>
|
||||
local_shared_ptr( local_shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT : px( p ), pn( r.pn )
|
||||
{
|
||||
@@ -304,8 +286,6 @@ public:
|
||||
r.pn = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// assignment
|
||||
|
||||
local_shared_ptr & operator=( local_shared_ptr const & r ) BOOST_SP_NOEXCEPT
|
||||
@@ -320,8 +300,6 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
local_shared_ptr & operator=( local_shared_ptr && r ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
local_shared_ptr( std::move( r ) ).swap( *this );
|
||||
@@ -335,16 +313,12 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
local_shared_ptr & operator=( std::nullptr_t ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
local_shared_ptr().swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template<class Y, class D>
|
||||
local_shared_ptr & operator=( std::unique_ptr<Y, D> && r )
|
||||
{
|
||||
@@ -352,8 +326,6 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class Y, class D>
|
||||
local_shared_ptr & operator=( boost::movelib::unique_ptr<Y, D> r ); // !
|
||||
|
||||
@@ -384,15 +356,11 @@ public:
|
||||
local_shared_ptr( r, p ).swap( *this );
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template<class Y> void reset( local_shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
local_shared_ptr( std::move( r ), p ).swap( *this );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// accessors
|
||||
|
||||
typename boost::detail::sp_dereference< T >::type operator* () const BOOST_SP_NOEXCEPT
|
||||
@@ -587,8 +555,6 @@ template<class T, class U> local_shared_ptr<T> reinterpret_pointer_cast( local_s
|
||||
return local_shared_ptr<T>( r, p );
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template<class T, class U> local_shared_ptr<T> static_pointer_cast( local_shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
(void) static_cast< T* >( static_cast< U* >( 0 ) );
|
||||
@@ -629,8 +595,6 @@ template<class T, class U> local_shared_ptr<T> reinterpret_pointer_cast( local_s
|
||||
return local_shared_ptr<T>( std::move(r), p );
|
||||
}
|
||||
|
||||
#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
// get_pointer() enables boost::mem_fn to recognize local_shared_ptr
|
||||
|
||||
template<class T> inline typename local_shared_ptr<T>::element_type * get_pointer( local_shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
|
||||
|
Reference in New Issue
Block a user