diff --git a/test/intrusive_ptr_move_test.cpp b/test/intrusive_ptr_move_test.cpp index c894b51..8d3792e 100644 --- a/test/intrusive_ptr_move_test.cpp +++ b/test/intrusive_ptr_move_test.cpp @@ -47,8 +47,6 @@ public: return use_count_; } -#if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - inline friend void intrusive_ptr_add_ref(base const * p) { ++p->use_count_; @@ -58,45 +56,12 @@ public: { if(--p->use_count_ == 0) delete p; } - -#else - - void add_ref() const - { - ++use_count_; - } - - void release() const - { - if(--use_count_ == 0) delete this; - } - -#endif }; long base::instances = 0; } // namespace N -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - -namespace boost -{ - -inline void intrusive_ptr_add_ref(N::base const * p) -{ - p->add_ref(); -} - -inline void intrusive_ptr_release(N::base const * p) -{ - p->release(); -} - -} // namespace boost - -#endif - // struct X: public virtual N::base diff --git a/test/intrusive_ptr_test.cpp b/test/intrusive_ptr_test.cpp index 384337d..2530acf 100644 --- a/test/intrusive_ptr_test.cpp +++ b/test/intrusive_ptr_test.cpp @@ -50,8 +50,6 @@ public: return use_count_; } -#if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - inline friend void intrusive_ptr_add_ref(base const * p) { ++p->use_count_; @@ -61,45 +59,12 @@ public: { if(--p->use_count_ == 0) delete p; } - -#else - - void add_ref() const - { - ++use_count_; - } - - void release() const - { - if(--use_count_ == 0) delete this; - } - -#endif }; long base::instances = 0; } // namespace N -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - -namespace boost -{ - -inline void intrusive_ptr_add_ref(N::base const * p) -{ - p->add_ref(); -} - -inline void intrusive_ptr_release(N::base const * p) -{ - p->release(); -} - -} // namespace boost - -#endif - // struct X: public virtual N::base @@ -170,9 +135,6 @@ void pointer_constructor() BOOST_TEST( N::base::instances == 1 ); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::intrusive_ptr_add_ref; -#endif intrusive_ptr_add_ref(p); BOOST_TEST(p->use_count() == 1); @@ -581,9 +543,6 @@ void test() BOOST_TEST( N::base::instances == 1 ); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::intrusive_ptr_add_ref; -#endif intrusive_ptr_add_ref( p ); BOOST_TEST( p->use_count() == 1 ); @@ -649,9 +608,6 @@ void test() X * p = new X; BOOST_TEST( p->use_count() == 0 ); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::intrusive_ptr_add_ref; -#endif intrusive_ptr_add_ref( p ); BOOST_TEST( p->use_count() == 1 ); @@ -679,10 +635,6 @@ void test() BOOST_TEST(px? false: true); BOOST_TEST(!px); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } @@ -691,10 +643,6 @@ void test() BOOST_TEST(px? false: true); BOOST_TEST(!px); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } @@ -705,10 +653,6 @@ void test() BOOST_TEST(&*px == px.get()); BOOST_TEST(px.operator ->() == px.get()); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } diff --git a/test/shared_ptr_test.cpp b/test/shared_ptr_test.cpp index 003735d..fcca7d2 100644 --- a/test/shared_ptr_test.cpp +++ b/test/shared_ptr_test.cpp @@ -1979,10 +1979,6 @@ void test() BOOST_TEST(px? false: true); BOOST_TEST(!px); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } @@ -1992,10 +1988,6 @@ void test() BOOST_TEST(px? false: true); BOOST_TEST(!px); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } @@ -2005,10 +1997,6 @@ void test() BOOST_TEST(px? false: true); BOOST_TEST(!px); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } @@ -2021,10 +2009,6 @@ void test() BOOST_TEST(&*px == px.get()); BOOST_TEST(px.operator ->() == px.get()); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } @@ -2037,10 +2021,6 @@ void test() BOOST_TEST(&*px == px.get()); BOOST_TEST(px.operator ->() == px.get()); -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) - using boost::get_pointer; -#endif - BOOST_TEST(get_pointer(px) == px.get()); } } diff --git a/test/smart_ptr_test.cpp b/test/smart_ptr_test.cpp index 0e1a927..12bedc7 100644 --- a/test/smart_ptr_test.cpp +++ b/test/smart_ptr_test.cpp @@ -178,10 +178,6 @@ void test() BOOST_TEST( cp.use_count() == 3 ); BOOST_TEST( *cp == 87654 ); -#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) - using boost::swap; -#endif - boost::shared_ptr cp4; swap( cp2, cp4 ); BOOST_TEST( cp4.use_count() == 3 );