Replace use of BOOST_HAS_RVALUE_REFS with !BOOST_NO_CXX11_RVALUE_REFERENCES.

[SVN r81900]
This commit is contained in:
Peter Dimov
2012-12-13 16:48:57 +00:00
parent bbf0245248
commit 647f67aabf
14 changed files with 27 additions and 27 deletions

View File

@@ -382,7 +382,7 @@ public:
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
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
@@ -494,7 +494,7 @@ public:
// Move support
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
weak_count(weak_count && r): pi_(r.pi_) // nothrow
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)

View File

@@ -23,7 +23,7 @@ namespace boost
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
{

View File

@@ -108,7 +108,7 @@ public:
// 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 )
{

View File

@@ -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 );
}
#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
@@ -237,7 +237,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail::
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

View File

@@ -86,7 +86,7 @@ public:
// 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
@@ -145,7 +145,7 @@ public:
#endif
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT
{

View File

@@ -389,7 +389,7 @@ public:
// 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
@@ -452,7 +452,7 @@ public:
boost::detail::sp_deleter_construct( this, tmp );
}
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
@@ -527,7 +527,7 @@ public:
return *this;
}
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
shared_ptr & operator=( std::auto_ptr<Y> && r )
@@ -562,7 +562,7 @@ public:
// 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()
{

View File

@@ -37,7 +37,7 @@ public:
// 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
@@ -86,7 +86,7 @@ public:
boost::detail::sp_assert_convertible< Y, T >();
}
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
@@ -149,7 +149,7 @@ public:
return *this;
}
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
weak_ptr & operator=( weak_ptr<Y> && r ) BOOST_NOEXCEPT

View File

@@ -41,7 +41,7 @@
template&lt;typename T, typename A&gt;
shared_ptr&lt;T&gt; <a href="#functions">allocate_shared</a>( A const &amp; );
#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&lt;typename T, typename... Args&gt;
shared_ptr&lt;T&gt; <a href="#functions">make_shared</a>( Args &amp;&amp; ... args );

View File

@@ -57,7 +57,7 @@ int main()
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 );

View File

@@ -32,7 +32,7 @@
#include <boost/config.hpp>
#include <utility>
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
namespace N
{
@@ -173,7 +173,7 @@ int main()
return boost::report_errors();
}
#else // !defined( BOOST_HAS_RVALUE_REFS )
#else // defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
int main()
{

View File

@@ -56,7 +56,7 @@ int main()
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 );

View File

@@ -12,14 +12,14 @@
#include <boost/make_shared.hpp>
#include <boost/shared_ptr.hpp>
#if !defined( BOOST_HAS_RVALUE_REFS )
#if defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
int main()
{
return 0;
}
#else // BOOST_HAS_RVALUE_REFS
#else // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
class myarg
{
@@ -95,4 +95,4 @@ int main()
return boost::report_errors();
}
#endif // BOOST_HAS_RVALUE_REFS
#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )

View File

@@ -12,7 +12,7 @@
#include <boost/detail/lightweight_test.hpp>
#include <utility>
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
struct X
{
@@ -97,7 +97,7 @@ int main()
return boost::report_errors();
}
#else // !defined( BOOST_HAS_RVALUE_REFS )
#else // defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
int main()
{

View File

@@ -12,7 +12,7 @@
#include <boost/detail/lightweight_test.hpp>
#include <utility>
#if defined( BOOST_HAS_RVALUE_REFS )
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
struct X
{
@@ -112,7 +112,7 @@ int main()
return boost::report_errors();
}
#else // !defined( BOOST_HAS_RVALUE_REFS )
#else // defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
int main()
{