forked from boostorg/smart_ptr
Replace use of BOOST_HAS_RVALUE_REFS with !BOOST_NO_CXX11_RVALUE_REFERENCES.
[SVN r81900]
This commit is contained in:
@@ -382,7 +382,7 @@ public:
|
|||||||
if( pi_ != 0 ) pi_->add_ref_copy();
|
if( pi_ != 0 ) pi_->add_ref_copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
shared_count(shared_count && r): pi_(r.pi_) // nothrow
|
shared_count(shared_count && r): pi_(r.pi_) // nothrow
|
||||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||||
@@ -494,7 +494,7 @@ public:
|
|||||||
|
|
||||||
// Move support
|
// Move support
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
weak_count(weak_count && r): pi_(r.pi_) // nothrow
|
weak_count(weak_count && r): pi_(r.pi_) // nothrow
|
||||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||||
|
@@ -23,7 +23,7 @@ namespace boost
|
|||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT
|
template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT
|
||||||
{
|
{
|
||||||
|
@@ -108,7 +108,7 @@ public:
|
|||||||
|
|
||||||
// Move support
|
// Move support
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px )
|
intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px )
|
||||||
{
|
{
|
||||||
|
@@ -199,7 +199,7 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type
|
|||||||
return boost::shared_ptr< T >( pt, pt2 );
|
return boost::shared_ptr< T >( pt, pt2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( BOOST_HAS_VARIADIC_TMPL ) && defined( BOOST_HAS_RVALUE_REFS )
|
#if defined( BOOST_HAS_VARIADIC_TMPL ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
// Variadic templates, rvalue reference
|
// Variadic templates, rvalue reference
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail::
|
|||||||
return boost::shared_ptr< T >( pt, pt2 );
|
return boost::shared_ptr< T >( pt, pt2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined( BOOST_HAS_RVALUE_REFS )
|
#elif !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
// For example MSVC 10.0
|
// For example MSVC 10.0
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@ public:
|
|||||||
|
|
||||||
// generated copy constructor, destructor are fine...
|
// generated copy constructor, destructor are fine...
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
// ... except in C++0x, move disables the implicit copy
|
// ... except in C++0x, move disables the implicit copy
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ public:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT
|
shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT
|
||||||
{
|
{
|
||||||
|
@@ -389,7 +389,7 @@ public:
|
|||||||
|
|
||||||
// generated copy constructor, destructor are fine...
|
// generated copy constructor, destructor are fine...
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
// ... except in C++0x, move disables the implicit copy
|
// ... except in C++0x, move disables the implicit copy
|
||||||
|
|
||||||
@@ -452,7 +452,7 @@ public:
|
|||||||
boost::detail::sp_deleter_construct( this, tmp );
|
boost::detail::sp_deleter_construct( this, tmp );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
|
shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
|
||||||
@@ -527,7 +527,7 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
shared_ptr & operator=( std::auto_ptr<Y> && r )
|
shared_ptr & operator=( std::auto_ptr<Y> && r )
|
||||||
@@ -562,7 +562,7 @@ public:
|
|||||||
|
|
||||||
// Move support
|
// Move support
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn()
|
shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn()
|
||||||
{
|
{
|
||||||
|
@@ -37,7 +37,7 @@ public:
|
|||||||
|
|
||||||
// generated copy constructor, assignment, destructor are fine...
|
// generated copy constructor, assignment, destructor are fine...
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
// ... except in C++0x, move disables the implicit copy
|
// ... except in C++0x, move disables the implicit copy
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ public:
|
|||||||
boost::detail::sp_assert_convertible< Y, T >();
|
boost::detail::sp_assert_convertible< Y, T >();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
|
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
|
||||||
@@ -149,7 +149,7 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
template<class Y>
|
template<class Y>
|
||||||
weak_ptr & operator=( weak_ptr<Y> && r ) BOOST_NOEXCEPT
|
weak_ptr & operator=( weak_ptr<Y> && r ) BOOST_NOEXCEPT
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
template<typename T, typename A>
|
template<typename T, typename A>
|
||||||
shared_ptr<T> <a href="#functions">allocate_shared</a>( A const & );
|
shared_ptr<T> <a href="#functions">allocate_shared</a>( A const & );
|
||||||
|
|
||||||
#if defined( BOOST_HAS_VARIADIC_TMPL ) && defined( BOOST_HAS_RVALUE_REFS ) // C++0x prototypes
|
#if defined( BOOST_HAS_VARIADIC_TMPL ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // C++0x prototypes
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
shared_ptr<T> <a href="#functions">make_shared</a>( Args && ... args );
|
shared_ptr<T> <a href="#functions">make_shared</a>( Args && ... args );
|
||||||
|
@@ -57,7 +57,7 @@ int main()
|
|||||||
BOOST_TEST( X::instances == 0 );
|
BOOST_TEST( X::instances == 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
|
#if defined( BOOST_HAS_VARIADIC_TMPL ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::shared_ptr< X[] > px = boost::allocate_shared< X[] >( std::allocator<X>(), 2, 1 );
|
boost::shared_ptr< X[] > px = boost::allocate_shared< X[] >( std::allocator<X>(), 2, 1 );
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
namespace N
|
namespace N
|
||||||
{
|
{
|
||||||
@@ -173,7 +173,7 @@ int main()
|
|||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // !defined( BOOST_HAS_RVALUE_REFS )
|
#else // defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
@@ -56,7 +56,7 @@ int main()
|
|||||||
BOOST_TEST( X::instances == 0 );
|
BOOST_TEST( X::instances == 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
|
#if defined( BOOST_HAS_VARIADIC_TMPL ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::shared_ptr< X[] > px = boost::make_shared< X[] >( 2, 1 );
|
boost::shared_ptr< X[] > px = boost::make_shared< X[] >( 2, 1 );
|
||||||
|
@@ -12,14 +12,14 @@
|
|||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#if !defined( BOOST_HAS_RVALUE_REFS )
|
#if defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // BOOST_HAS_RVALUE_REFS
|
#else // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
class myarg
|
class myarg
|
||||||
{
|
{
|
||||||
@@ -95,4 +95,4 @@ int main()
|
|||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BOOST_HAS_RVALUE_REFS
|
#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
struct X
|
struct X
|
||||||
{
|
{
|
||||||
@@ -97,7 +97,7 @@ int main()
|
|||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // !defined( BOOST_HAS_RVALUE_REFS )
|
#else // defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#if defined( BOOST_HAS_RVALUE_REFS )
|
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
struct X
|
struct X
|
||||||
{
|
{
|
||||||
@@ -112,7 +112,7 @@ int main()
|
|||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // !defined( BOOST_HAS_RVALUE_REFS )
|
#else // defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user