diff --git a/include/boost/pointer_cast.hpp b/include/boost/pointer_cast.hpp index d47327b..0aa0a9c 100644 --- a/include/boost/pointer_cast.hpp +++ b/include/boost/pointer_cast.hpp @@ -10,8 +10,11 @@ #ifndef BOOST_POINTER_CAST_HPP #define BOOST_POINTER_CAST_HPP -#include #include +#include +#include +#include +#include namespace boost { @@ -43,16 +46,6 @@ inline T* reinterpret_pointer_cast(U *ptr) BOOST_SP_NOEXCEPT return reinterpret_cast(ptr); } -} // namespace boost - -#if !defined( BOOST_NO_CXX11_SMART_PTR ) - -#include -#include -#include - -namespace boost { - //static_pointer_cast overload for std::shared_ptr using std::static_pointer_cast; @@ -117,6 +110,4 @@ template std::unique_ptr reinterpret_pointer_cast( std::uni } // namespace boost -#endif // #if !defined( BOOST_NO_CXX11_SMART_PTR ) - #endif //BOOST_POINTER_CAST_HPP diff --git a/include/boost/smart_ptr/detail/lightweight_thread.hpp b/include/boost/smart_ptr/detail/lightweight_thread.hpp index 867f00b..e14efed 100644 --- a/include/boost/smart_ptr/detail/lightweight_thread.hpp +++ b/include/boost/smart_ptr/detail/lightweight_thread.hpp @@ -106,16 +106,8 @@ public: extern "C" void * lw_thread_routine( void * pv ) { -#if defined(BOOST_NO_CXX11_SMART_PTR) - - std::auto_ptr pt( static_cast( pv ) ); - -#else - std::unique_ptr pt( static_cast( pv ) ); -#endif - pt->run(); return 0; @@ -125,16 +117,8 @@ extern "C" void * lw_thread_routine( void * pv ) unsigned __stdcall lw_thread_routine( void * pv ) { -#if defined(BOOST_NO_CXX11_SMART_PTR) - - std::auto_ptr pt( static_cast( pv ) ); - -#else - std::unique_ptr pt( static_cast( pv ) ); -#endif - pt->run(); return 0; @@ -162,16 +146,8 @@ private: template int lw_thread_create( lw_thread_t & th, F f ) { -#if defined(BOOST_NO_CXX11_SMART_PTR) - - std::auto_ptr p( new lw_thread_impl( f ) ); - -#else - std::unique_ptr p( new lw_thread_impl( f ) ); -#endif - int r = lw_thread_create_( &th, 0, lw_thread_routine, p.get() ); if( r == 0 ) diff --git a/include/boost/smart_ptr/detail/shared_count.hpp b/include/boost/smart_ptr/detail/shared_count.hpp index 2e80e85..2d6d8e8 100644 --- a/include/boost/smart_ptr/detail/shared_count.hpp +++ b/include/boost/smart_ptr/detail/shared_count.hpp @@ -358,8 +358,6 @@ public: #endif -#if !defined( BOOST_NO_CXX11_SMART_PTR ) - template explicit shared_count( std::unique_ptr & r ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) @@ -383,8 +381,6 @@ public: r.release(); } -#endif - template explicit shared_count( boost::movelib::unique_ptr & r ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) diff --git a/test/allocate_unique_aggregate_test.cpp b/test/allocate_unique_aggregate_test.cpp index f1c558c..42c7d86 100644 --- a/test/allocate_unique_aggregate_test.cpp +++ b/test/allocate_unique_aggregate_test.cpp @@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 46000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) && \ - !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) #include #include +#include template struct creator { @@ -76,9 +72,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_args_test.cpp b/test/allocate_unique_args_test.cpp index aafbc3d..bc0f942 100644 --- a/test/allocate_unique_args_test.cpp +++ b/test/allocate_unique_args_test.cpp @@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 46000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) && \ - !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #include #include +#include template struct creator { @@ -103,9 +99,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_array_construct_test.cpp b/test/allocate_unique_array_construct_test.cpp index 80b9f87..0b13e2c 100644 --- a/test/allocate_unique_array_construct_test.cpp +++ b/test/allocate_unique_array_construct_test.cpp @@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 48000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) && \ - !defined(BOOST_NO_CXX11_ALLOCATOR) #include #include +#include struct allow { }; @@ -158,9 +154,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_array_noinit_test.cpp b/test/allocate_unique_array_noinit_test.cpp index 7c9c122..2f95ff4 100644 --- a/test/allocate_unique_array_noinit_test.cpp +++ b/test/allocate_unique_array_noinit_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 48000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -220,9 +217,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_array_test.cpp b/test/allocate_unique_array_test.cpp index 5901245..59bbac4 100644 --- a/test/allocate_unique_array_test.cpp +++ b/test/allocate_unique_array_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 48000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -232,9 +229,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_array_throws_test.cpp b/test/allocate_unique_array_throws_test.cpp index 64670bb..2a41c48 100644 --- a/test/allocate_unique_array_throws_test.cpp +++ b/test/allocate_unique_array_throws_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 48000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -124,9 +121,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_array_value_test.cpp b/test/allocate_unique_array_value_test.cpp index 256b492..6120638 100644 --- a/test/allocate_unique_array_value_test.cpp +++ b/test/allocate_unique_array_value_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 48000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -90,9 +87,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_arrays_test.cpp b/test/allocate_unique_arrays_test.cpp index 43354f0..e089d9a 100644 --- a/test/allocate_unique_arrays_test.cpp +++ b/test/allocate_unique_arrays_test.cpp @@ -5,13 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 48000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) && \ - !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) #include #include +#include template struct creator { @@ -91,9 +87,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_construct_test.cpp b/test/allocate_unique_construct_test.cpp index 5abba99..7ffc78b 100644 --- a/test/allocate_unique_construct_test.cpp +++ b/test/allocate_unique_construct_test.cpp @@ -5,10 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) && !defined(BOOST_NO_CXX11_ALLOCATOR) #include #include +#include struct allow { }; @@ -101,9 +100,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_noinit_test.cpp b/test/allocate_unique_noinit_test.cpp index d20c106..1c89681 100644 --- a/test/allocate_unique_noinit_test.cpp +++ b/test/allocate_unique_noinit_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 46000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -118,9 +115,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_test.cpp b/test/allocate_unique_test.cpp index 862bf97..15e7ae0 100644 --- a/test/allocate_unique_test.cpp +++ b/test/allocate_unique_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 46000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -107,9 +104,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_throws_test.cpp b/test/allocate_unique_throws_test.cpp index 7d2d047..9abad0f 100644 --- a/test/allocate_unique_throws_test.cpp +++ b/test/allocate_unique_throws_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 46000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -88,9 +85,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/allocate_unique_value_test.cpp b/test/allocate_unique_value_test.cpp index 153e731..d6b9705 100644 --- a/test/allocate_unique_value_test.cpp +++ b/test/allocate_unique_value_test.cpp @@ -5,12 +5,9 @@ Copyright 2019 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 46000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template struct creator { @@ -95,9 +92,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/get_allocator_pointer_test.cpp b/test/get_allocator_pointer_test.cpp index e59b2f9..e8c7d8c 100644 --- a/test/get_allocator_pointer_test.cpp +++ b/test/get_allocator_pointer_test.cpp @@ -5,12 +5,9 @@ Copyright 2021 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if (!defined(BOOST_LIBSTDCXX_VERSION) || \ - BOOST_LIBSTDCXX_VERSION >= 46000) && \ - !defined(BOOST_NO_CXX11_SMART_PTR) #include #include +#include template class point { @@ -242,9 +239,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_args_test.cpp b/test/make_unique_args_test.cpp index 6e46612..66c963d 100644 --- a/test/make_unique_args_test.cpp +++ b/test/make_unique_args_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include class type { public: @@ -147,9 +146,3 @@ int main() #endif return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_array_noinit_test.cpp b/test/make_unique_array_noinit_test.cpp index b0ae926..9873cc1 100644 --- a/test/make_unique_array_noinit_test.cpp +++ b/test/make_unique_array_noinit_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include class type { public: @@ -79,9 +78,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_array_test.cpp b/test/make_unique_array_test.cpp index 06073c5..0581e0e 100644 --- a/test/make_unique_array_test.cpp +++ b/test/make_unique_array_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include class type { public: @@ -102,9 +101,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_array_throws_test.cpp b/test/make_unique_array_throws_test.cpp index 3d1e53c..721afbc 100644 --- a/test/make_unique_array_throws_test.cpp +++ b/test/make_unique_array_throws_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include class type { public: @@ -64,9 +63,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_noinit_test.cpp b/test/make_unique_noinit_test.cpp index 381e0cb..f6fcb24 100644 --- a/test/make_unique_noinit_test.cpp +++ b/test/make_unique_noinit_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include class type { public: @@ -55,9 +54,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_test.cpp b/test/make_unique_test.cpp index 9abd8b3..f0cd024 100644 --- a/test/make_unique_test.cpp +++ b/test/make_unique_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include class type { public: @@ -62,9 +61,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_throws_test.cpp b/test/make_unique_throws_test.cpp index 3f4fe86..df03344 100644 --- a/test/make_unique_throws_test.cpp +++ b/test/make_unique_throws_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include class type { public: @@ -43,9 +42,3 @@ int main() } return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/make_unique_value_test.cpp b/test/make_unique_value_test.cpp index 3b68c55..b71ae23 100644 --- a/test/make_unique_value_test.cpp +++ b/test/make_unique_value_test.cpp @@ -5,10 +5,9 @@ Copyright 2014 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#include -#if !defined(BOOST_NO_CXX11_SMART_PTR) -#include #include +#include +#include struct type { int x; @@ -48,9 +47,3 @@ int main() #endif return boost::report_errors(); } -#else -int main() -{ - return 0; -} -#endif diff --git a/test/pointer_cast_test2.cpp b/test/pointer_cast_test2.cpp index fd1d63e..16e0479 100644 --- a/test/pointer_cast_test2.cpp +++ b/test/pointer_cast_test2.cpp @@ -8,19 +8,9 @@ // http://www.boost.org/LICENSE_1_0.txt // -#include - -#if defined( BOOST_NO_CXX11_SMART_PTR ) - -int main() -{ - return 0; -} - -#else - #include #include +#include #include struct B1 @@ -243,5 +233,3 @@ int main() return boost::report_errors(); } - -#endif