diff --git a/include/boost/smart_ptr/detail/shared_count.hpp b/include/boost/smart_ptr/detail/shared_count.hpp index e91179d..f055fd0 100644 --- a/include/boost/smart_ptr/detail/shared_count.hpp +++ b/include/boost/smart_ptr/detail/shared_count.hpp @@ -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) diff --git a/include/boost/smart_ptr/detail/sp_forward.hpp b/include/boost/smart_ptr/detail/sp_forward.hpp index 25c4d48..5f1d190 100644 --- a/include/boost/smart_ptr/detail/sp_forward.hpp +++ b/include/boost/smart_ptr/detail/sp_forward.hpp @@ -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 { diff --git a/include/boost/smart_ptr/intrusive_ptr.hpp b/include/boost/smart_ptr/intrusive_ptr.hpp index ffb2dba..64a2923 100644 --- a/include/boost/smart_ptr/intrusive_ptr.hpp +++ b/include/boost/smart_ptr/intrusive_ptr.hpp @@ -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 ) { diff --git a/include/boost/smart_ptr/make_shared_object.hpp b/include/boost/smart_ptr/make_shared_object.hpp index aff19b9..89a7116 100644 --- a/include/boost/smart_ptr/make_shared_object.hpp +++ b/include/boost/smart_ptr/make_shared_object.hpp @@ -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_NO_CXX11_VARIADIC_TEMPLATES ) && !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 diff --git a/include/boost/smart_ptr/shared_array.hpp b/include/boost/smart_ptr/shared_array.hpp index f54f481..38047ff 100644 --- a/include/boost/smart_ptr/shared_array.hpp +++ b/include/boost/smart_ptr/shared_array.hpp @@ -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 { diff --git a/include/boost/smart_ptr/shared_ptr.hpp b/include/boost/smart_ptr/shared_ptr.hpp index 8954d1d..fd72995 100644 --- a/include/boost/smart_ptr/shared_ptr.hpp +++ b/include/boost/smart_ptr/shared_ptr.hpp @@ -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 shared_ptr( std::auto_ptr && 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 shared_ptr & operator=( std::auto_ptr && 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() { diff --git a/include/boost/smart_ptr/weak_ptr.hpp b/include/boost/smart_ptr/weak_ptr.hpp index 59cdd45..e3e9ad9 100644 --- a/include/boost/smart_ptr/weak_ptr.hpp +++ b/include/boost/smart_ptr/weak_ptr.hpp @@ -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 #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 weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT diff --git a/make_shared.html b/make_shared.html index e47fe2a..e2335d3 100644 --- a/make_shared.html +++ b/make_shared.html @@ -41,7 +41,7 @@ template<typename T, typename A> shared_ptr<T> allocate_shared( A const & ); -#if defined( BOOST_HAS_VARIADIC_TMPL ) && defined( BOOST_HAS_RVALUE_REFS ) // C++0x prototypes +#if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // C++0x prototypes template<typename T, typename... Args> shared_ptr<T> make_shared( Args && ... args ); diff --git a/test/allocate_shared_array_args_test.cpp b/test/allocate_shared_array_args_test.cpp index 1226b94..f3d38b6 100644 --- a/test/allocate_shared_array_args_test.cpp +++ b/test/allocate_shared_array_args_test.cpp @@ -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_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) { boost::shared_ptr< X[] > px = boost::allocate_shared< X[] >( std::allocator(), 2, 1 ); diff --git a/test/intrusive_ptr_move_test.cpp b/test/intrusive_ptr_move_test.cpp index 3faf16e..0e89764 100644 --- a/test/intrusive_ptr_move_test.cpp +++ b/test/intrusive_ptr_move_test.cpp @@ -32,7 +32,7 @@ #include #include -#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() { diff --git a/test/make_shared_array_args_test.cpp b/test/make_shared_array_args_test.cpp index c308c7a..8a89429 100644 --- a/test/make_shared_array_args_test.cpp +++ b/test/make_shared_array_args_test.cpp @@ -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_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) { boost::shared_ptr< X[] > px = boost::make_shared< X[] >( 2, 1 ); diff --git a/test/make_shared_perfect_forwarding_test.cpp b/test/make_shared_perfect_forwarding_test.cpp index bd5f5c5..b7ad05d 100644 --- a/test/make_shared_perfect_forwarding_test.cpp +++ b/test/make_shared_perfect_forwarding_test.cpp @@ -12,14 +12,14 @@ #include #include -#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 ) diff --git a/test/shared_ptr_move_test.cpp b/test/shared_ptr_move_test.cpp index 82ba9d6..e659b24 100644 --- a/test/shared_ptr_move_test.cpp +++ b/test/shared_ptr_move_test.cpp @@ -12,7 +12,7 @@ #include #include -#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() { diff --git a/test/weak_ptr_move_test.cpp b/test/weak_ptr_move_test.cpp index 4df3691..dbf2629 100644 --- a/test/weak_ptr_move_test.cpp +++ b/test/weak_ptr_move_test.cpp @@ -12,7 +12,7 @@ #include #include -#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() {