diff --git a/extras/test/shared_ptr_mt_test.cpp b/extras/test/shared_ptr_mt_test.cpp index 8a50425..319d06f 100644 --- a/extras/test/shared_ptr_mt_test.cpp +++ b/extras/test/shared_ptr_mt_test.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // shared_ptr_mt_test.cpp - tests shared_ptr with multiple threads // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. @@ -18,14 +9,14 @@ #include #include +#include + +#include #include - #include #include -#include - // int const n = 1024 * 1024; diff --git a/extras/test/shared_ptr_timing_test.cpp b/extras/test/shared_ptr_timing_test.cpp index 79e62ff..ff5505f 100644 --- a/extras/test/shared_ptr_timing_test.cpp +++ b/extras/test/shared_ptr_timing_test.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // shared_ptr_timing_test.cpp - use to evaluate the impact of thread safety // diff --git a/extras/test/weak_ptr_mt_test.cpp b/extras/test/weak_ptr_mt_test.cpp index 5b11ff9..fa81f8a 100644 --- a/extras/test/weak_ptr_mt_test.cpp +++ b/extras/test/weak_ptr_mt_test.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // weak_ptr_mt_test.cpp // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. @@ -19,15 +10,15 @@ #include #include #include +#include + +#include #include - #include #include #include -#include - // int const n = 16384; diff --git a/extras/test/weak_ptr_timing_test.cpp b/extras/test/weak_ptr_timing_test.cpp index 1c24b0a..50cfe65 100644 --- a/extras/test/weak_ptr_timing_test.cpp +++ b/extras/test/weak_ptr_timing_test.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // weak_ptr_timing_test.cpp // @@ -20,6 +11,7 @@ #include #include +#include #include #include diff --git a/include/boost/smart_ptr/detail/shared_count.hpp b/include/boost/smart_ptr/detail/shared_count.hpp index 924dbee..0269d57 100644 --- a/include/boost/smart_ptr/detail/shared_count.hpp +++ b/include/boost/smart_ptr/detail/shared_count.hpp @@ -164,18 +164,11 @@ public: #endif } -#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) - template shared_count( Y * p, D d ): pi_(0) -#else template shared_count( P p, D d ): pi_(0) -#endif #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { -#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) - typedef Y* P; -#endif #ifndef BOOST_NO_EXCEPTIONS try diff --git a/include/boost/smart_ptr/detail/sp_counted_base_w32.hpp b/include/boost/smart_ptr/detail/sp_counted_base_w32.hpp index dc0df4a..0fe0341 100644 --- a/include/boost/smart_ptr/detail/sp_counted_base_w32.hpp +++ b/include/boost/smart_ptr/detail/sp_counted_base_w32.hpp @@ -90,18 +90,7 @@ public: long tmp = static_cast< long const volatile& >( use_count_ ); if( tmp == 0 ) return false; -#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 ) - - // work around a code generation bug - - long tmp2 = tmp + 1; - if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true; - -#else - if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true; - -#endif } } diff --git a/include/boost/smart_ptr/shared_array.hpp b/include/boost/smart_ptr/shared_array.hpp index 34e8ec5..284a75c 100644 --- a/include/boost/smart_ptr/shared_array.hpp +++ b/include/boost/smart_ptr/shared_array.hpp @@ -140,8 +140,6 @@ public: return *this; } -#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) - template shared_array & operator=( shared_array const & r ) BOOST_SP_NOEXCEPT { @@ -149,8 +147,6 @@ public: return *this; } -#endif - #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) shared_array & operator=( shared_array && r ) BOOST_SP_NOEXCEPT diff --git a/include/boost/smart_ptr/shared_ptr.hpp b/include/boost/smart_ptr/shared_ptr.hpp index 854078f..9b40c43 100644 --- a/include/boost/smart_ptr/shared_ptr.hpp +++ b/include/boost/smart_ptr/shared_ptr.hpp @@ -570,8 +570,6 @@ public: return *this; } -#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) - template shared_ptr & operator=(shared_ptr const & r) BOOST_SP_NOEXCEPT { @@ -579,8 +577,6 @@ public: return *this; } -#endif - #ifndef BOOST_NO_AUTO_PTR template diff --git a/include/boost/smart_ptr/weak_ptr.hpp b/include/boost/smart_ptr/weak_ptr.hpp index 16eea67..2a583f9 100644 --- a/include/boost/smart_ptr/weak_ptr.hpp +++ b/include/boost/smart_ptr/weak_ptr.hpp @@ -155,8 +155,6 @@ public: #endif -#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300) - template weak_ptr & operator=( weak_ptr const & r ) BOOST_SP_NOEXCEPT { @@ -190,8 +188,6 @@ public: return *this; } -#endif - shared_ptr lock() const BOOST_SP_NOEXCEPT { return shared_ptr( *this, boost::detail::sp_nothrow_tag() ); diff --git a/test/auto_ptr_lv_fail.cpp b/test/auto_ptr_lv_fail.cpp index b86832e..82cf68a 100644 --- a/test/auto_ptr_lv_fail.cpp +++ b/test/auto_ptr_lv_fail.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // auto_ptr_lv_fail.cpp - a negative test for converting an auto_ptr to shared_ptr // diff --git a/test/intrusive_ptr_move_test.cpp b/test/intrusive_ptr_move_test.cpp index d6b3601..1a23bd0 100644 --- a/test/intrusive_ptr_move_test.cpp +++ b/test/intrusive_ptr_move_test.cpp @@ -1,21 +1,3 @@ -#include - -#if defined(BOOST_MSVC) - -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#pragma warning(disable: 4355) // 'this' : used in base member initializer list -#pragma warning(disable: 4511) // copy constructor could not be generated -#pragma warning(disable: 4512) // assignment operator could not be generated - -#if (BOOST_MSVC >= 1310) -#pragma warning(disable: 4675) // resolved overload found with Koenig lookup -#endif - -#endif - // // intrusive_ptr_move_test.cpp // @@ -26,9 +8,9 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include #include -#include +#include +#include #include #include diff --git a/test/intrusive_ptr_test.cpp b/test/intrusive_ptr_test.cpp index cbc7299..384337d 100644 --- a/test/intrusive_ptr_test.cpp +++ b/test/intrusive_ptr_test.cpp @@ -1,21 +1,3 @@ -#include - -#if defined(BOOST_MSVC) - -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#pragma warning(disable: 4355) // 'this' : used in base member initializer list -#pragma warning(disable: 4511) // copy constructor could not be generated -#pragma warning(disable: 4512) // assignment operator could not be generated - -#if (BOOST_MSVC >= 1310) -#pragma warning(disable: 4675) // resolved overload found with Koenig lookup -#endif - -#endif - // // intrusive_ptr_test.cpp // @@ -26,9 +8,9 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include #include -#include +#include +#include #include #include #include diff --git a/test/intrusive_ref_counter_test.cpp b/test/intrusive_ref_counter_test.cpp index 71c1cc9..bce7470 100644 --- a/test/intrusive_ref_counter_test.cpp +++ b/test/intrusive_ref_counter_test.cpp @@ -12,28 +12,11 @@ * This file contains tests for the \c intrusive_ref_counter base class. */ -#include - -#if defined(BOOST_MSVC) - -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#pragma warning(disable: 4355) // 'this' : used in base member initializer list -#pragma warning(disable: 4511) // copy constructor could not be generated -#pragma warning(disable: 4512) // assignment operator could not be generated - -#if (BOOST_MSVC >= 1310) -#pragma warning(disable: 4675) // resolved overload found with Koenig lookup -#endif - -#endif - -#include #include #include #include +#include +#include namespace N1 { diff --git a/test/scoped_array_eq_fail.cpp b/test/scoped_array_eq_fail.cpp index 6c7f214..574bd23 100644 --- a/test/scoped_array_eq_fail.cpp +++ b/test/scoped_array_eq_fail.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // scoped_array_eq_fail.cpp - a negative test for "p == q" // diff --git a/test/scoped_ptr_eq_fail.cpp b/test/scoped_ptr_eq_fail.cpp index 0d6ade4..5cdc28c 100644 --- a/test/scoped_ptr_eq_fail.cpp +++ b/test/scoped_ptr_eq_fail.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // scoped_ptr_eq_fail.cpp - a negative test for "p == q" // diff --git a/test/shared_from_this_test.cpp b/test/shared_from_this_test.cpp index 2a2725a..a0c2691 100644 --- a/test/shared_from_this_test.cpp +++ b/test/shared_from_this_test.cpp @@ -1,16 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - -#if defined(__GNUC__) && __GNUC__ > 4 -# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" -#endif - // // shared_from_this_test.cpp // @@ -21,9 +8,13 @@ // http://www.boost.org/LICENSE_1_0.txt) // +#if defined(__GNUC__) && __GNUC__ > 4 +# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" +#endif #include #include +#include #include diff --git a/test/shared_ptr_assign_fail.cpp b/test/shared_ptr_assign_fail.cpp index c2820e0..d3d2d34 100644 --- a/test/shared_ptr_assign_fail.cpp +++ b/test/shared_ptr_assign_fail.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // shared_ptr_assign_fail.cpp - a negative test for shared_ptr assignment // @@ -19,11 +10,6 @@ #include -bool boost_error(char const *, char const *, char const *, long) -{ - return true; -} - int main() { boost::shared_ptr p; diff --git a/test/shared_ptr_basic_test.cpp b/test/shared_ptr_basic_test.cpp index 19c2ac9..21b3426 100644 --- a/test/shared_ptr_basic_test.cpp +++ b/test/shared_ptr_basic_test.cpp @@ -1,23 +1,3 @@ -#include - -#if defined(BOOST_MSVC) - -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#pragma warning(disable: 4355) // 'this' : used in base member initializer list - -#if (BOOST_MSVC >= 1310) -#pragma warning(disable: 4675) // resolved overload found with Koenig lookup -#endif - -#endif - -#if defined(__GNUC__) && __GNUC__ > 4 -# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" -#endif - // // shared_ptr_basic_test.cpp // @@ -28,10 +8,15 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include +#if defined(__GNUC__) && __GNUC__ > 4 +# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" +#endif #include #include +#include + +#include int cnt = 0; diff --git a/test/shared_ptr_compare_fail.cpp b/test/shared_ptr_compare_fail.cpp index 296af14..0534a36 100644 --- a/test/shared_ptr_compare_fail.cpp +++ b/test/shared_ptr_compare_fail.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // shared_ptr_compare_fail.cpp - a negative test for "p > q" // diff --git a/test/shared_ptr_delete_fail.cpp b/test/shared_ptr_delete_fail.cpp index 66cfafe..b9fc2c8 100644 --- a/test/shared_ptr_delete_fail.cpp +++ b/test/shared_ptr_delete_fail.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // shared_ptr_delete_fail.cpp - a negative test for "delete sp;" // diff --git a/test/shared_ptr_pv_fail.cpp b/test/shared_ptr_pv_fail.cpp index 924e657..24e164c 100644 --- a/test/shared_ptr_pv_fail.cpp +++ b/test/shared_ptr_pv_fail.cpp @@ -1,12 +1,3 @@ -#include - -#if defined(BOOST_MSVC) -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#endif - // // shared_ptr_pv_fail.cpp - a negative test for converting a shared_ptr to void* // diff --git a/test/shared_ptr_test.cpp b/test/shared_ptr_test.cpp index 0b0de8e..003735d 100644 --- a/test/shared_ptr_test.cpp +++ b/test/shared_ptr_test.cpp @@ -1,23 +1,3 @@ -#include - -#if defined(BOOST_MSVC) - -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#pragma warning(disable: 4355) // 'this' : used in base member initializer list - -#if (BOOST_MSVC >= 1310) -#pragma warning(disable: 4675) // resolved overload found with Koenig lookup -#endif - -#endif - -#if defined(__GNUC__) && __GNUC__ > 4 -# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" -#endif - // // shared_ptr_test.cpp // @@ -28,10 +8,15 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include +#if defined(__GNUC__) && __GNUC__ > 4 +# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" +#endif #include #include +#include + +#include #include #include @@ -152,14 +137,10 @@ void pointer_constructor() { pc0_test(static_cast(0)); -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1300) - pc0_test(static_cast(0)); pc0_test(static_cast(0)); pc0_test(static_cast(0)); -#endif - { boost::shared_ptr pi(static_cast(0)); BOOST_TEST(pi? false: true); diff --git a/test/smart_ptr_test.cpp b/test/smart_ptr_test.cpp index b6be6b3..0e1a927 100644 --- a/test/smart_ptr_test.cpp +++ b/test/smart_ptr_test.cpp @@ -16,22 +16,9 @@ #define _CRT_SECURE_NO_WARNINGS -#include - -#if defined(BOOST_MSVC) - -# pragma warning(disable: 4786) // identifier truncated in debug info -# pragma warning(disable: 4710) // function not inlined -# pragma warning(disable: 4711) // function selected for automatic inline expansion -# pragma warning(disable: 4514) // unreferenced inline removed - -#if (BOOST_MSVC >= 1310) -# pragma warning(disable: 4675) // resolved overload found with Koenig lookup -#endif - -#endif #include +#include #include diff --git a/test/sp_nothrow_test.cpp b/test/sp_nothrow_test.cpp index 156e72e..e74f286 100644 --- a/test/sp_nothrow_test.cpp +++ b/test/sp_nothrow_test.cpp @@ -75,14 +75,7 @@ int main() test_default< Y >(); test_destroy< Y >(); - // test_move< Y >(); - BOOST_TEST_TRAIT_TRUE(( std::is_nothrow_move_constructible )); - -#if !( defined( BOOST_MSVC ) && BOOST_MSVC == 1700 ) - - BOOST_TEST_TRAIT_TRUE(( std::is_nothrow_move_assignable )); - -#endif + test_move< Y >(); test_default< boost::scoped_ptr >(); test_default< boost::scoped_array >(); diff --git a/test/sp_override_test.cpp b/test/sp_override_test.cpp index 6284376..8eb72dd 100644 --- a/test/sp_override_test.cpp +++ b/test/sp_override_test.cpp @@ -7,8 +7,6 @@ #endif #include -#include -#include int main() { @@ -16,10 +14,5 @@ int main() boost::shared_ptr p2( new int[1] ); boost::make_shared(); - -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1500) - boost::make_shared( 1 ); - -#endif } diff --git a/test/sp_pedantic_test.cpp b/test/sp_pedantic_test.cpp index 884ec6b..92df9c3 100644 --- a/test/sp_pedantic_test.cpp +++ b/test/sp_pedantic_test.cpp @@ -3,8 +3,6 @@ // https://www.boost.org/LICENSE_1_0.txt #include -#include -#include int main() { @@ -12,10 +10,5 @@ int main() boost::shared_ptr p2( new int[1] ); boost::make_shared(); - -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1500) - boost::make_shared( 1 ); - -#endif } diff --git a/test/sp_unary_addr_test.cpp b/test/sp_unary_addr_test.cpp index f9c4012..033fe44 100644 --- a/test/sp_unary_addr_test.cpp +++ b/test/sp_unary_addr_test.cpp @@ -49,9 +49,6 @@ int main() BOOST_TEST( q != 0 && q->data == 17041 ); } -#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) -#else - { boost::shared_ptr p( &x, deleter(), std::allocator() ); @@ -61,7 +58,5 @@ int main() BOOST_TEST( q != 0 && q->data == 17041 ); } -#endif - return boost::report_errors(); } diff --git a/test/weak_ptr_test.cpp b/test/weak_ptr_test.cpp index f659868..53e4efe 100644 --- a/test/weak_ptr_test.cpp +++ b/test/weak_ptr_test.cpp @@ -1,19 +1,3 @@ -#include - -#if defined(BOOST_MSVC) - -#pragma warning(disable: 4786) // identifier truncated in debug info -#pragma warning(disable: 4710) // function not inlined -#pragma warning(disable: 4711) // function selected for automatic inline expansion -#pragma warning(disable: 4514) // unreferenced inline removed -#pragma warning(disable: 4355) // 'this' : used in base member initializer list - -#if (BOOST_MSVC >= 1310) -#pragma warning(disable: 4675) // resolved overload found with Koenig lookup -#endif - -#endif - // // weak_ptr_test.cpp // @@ -24,10 +8,11 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include - #include #include +#include + +#include #include #include