From 0e6ddb843ed343796fdc5250a25064264ba2f6a7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 30 Sep 2013 15:57:14 +0000 Subject: [PATCH] SmartPointer: Remove obsolete GCC version checks. [SVN r86063] --- .../boost/smart_ptr/detail/sp_convertible.hpp | 4 --- include/boost/smart_ptr/intrusive_ptr.hpp | 23 --------------- include/boost/smart_ptr/shared_ptr.hpp | 29 ++----------------- 3 files changed, 2 insertions(+), 54 deletions(-) diff --git a/include/boost/smart_ptr/detail/sp_convertible.hpp b/include/boost/smart_ptr/detail/sp_convertible.hpp index 00d0b53..868eba6 100644 --- a/include/boost/smart_ptr/detail/sp_convertible.hpp +++ b/include/boost/smart_ptr/detail/sp_convertible.hpp @@ -21,10 +21,6 @@ # define BOOST_SP_NO_SP_CONVERTIBLE #endif -#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 ) -# define BOOST_SP_NO_SP_CONVERTIBLE -#endif - #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x630 ) # define BOOST_SP_NO_SP_CONVERTIBLE #endif diff --git a/include/boost/smart_ptr/intrusive_ptr.hpp b/include/boost/smart_ptr/intrusive_ptr.hpp index 43930a3..a855a10 100644 --- a/include/boost/smart_ptr/intrusive_ptr.hpp +++ b/include/boost/smart_ptr/intrusive_ptr.hpp @@ -208,17 +208,6 @@ template inline bool operator!=(T * a, intrusive_ptr const return a != b.get(); } -#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 - -// Resolve the ambiguity between our op!= and the one in rel_ops - -template inline bool operator!=(intrusive_ptr const & a, intrusive_ptr const & b) -{ - return a.get() != b.get(); -} - -#endif - #if !defined( BOOST_NO_CXX11_NULLPTR ) template inline bool operator==( intrusive_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT @@ -279,16 +268,6 @@ template intrusive_ptr dynamic_pointer_cast(intrusive_ptr std::ostream & operator<< (std::ostream & os, intrusive_ptr const & p) -{ - os << p.get(); - return os; -} - -#else - // in STLport's no-iostreams mode no iostream symbols can be used #ifndef _STLP_NO_IOSTREAMS @@ -300,8 +279,6 @@ template std::basic_ostream & operator<< (std:: #endif // _STLP_NO_IOSTREAMS -#endif // __GNUC__ < 3 - #endif // !defined(BOOST_NO_IOSTREAM) // hash_value diff --git a/include/boost/smart_ptr/shared_ptr.hpp b/include/boost/smart_ptr/shared_ptr.hpp index 22816df..a06d9e7 100644 --- a/include/boost/smart_ptr/shared_ptr.hpp +++ b/include/boost/smart_ptr/shared_ptr.hpp @@ -740,17 +740,6 @@ template inline bool operator!=(shared_ptr const & a, share return a.get() != b.get(); } -#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 - -// Resolve the ambiguity between our op!= and the one in rel_ops - -template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT -{ - return a.get() != b.get(); -} - -#endif - #if !defined( BOOST_NO_CXX11_NULLPTR ) template inline bool operator==( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT @@ -836,16 +825,6 @@ template inline typename shared_ptr::element_type * get_pointer(shar #if !defined(BOOST_NO_IOSTREAM) -#if ( defined(__GNUC__) && (__GNUC__ < 3) ) - -template std::ostream & operator<< (std::ostream & os, shared_ptr const & p) -{ - os << p.get(); - return os; -} - -#else - // in STLport's no-iostreams mode no iostream symbols can be used #ifndef _STLP_NO_IOSTREAMS @@ -857,8 +836,6 @@ template std::basic_ostream & operator<< (std:: #endif // _STLP_NO_IOSTREAMS -#endif // __GNUC__ < 3 - #endif // !defined(BOOST_NO_IOSTREAM) // get_deleter @@ -866,12 +843,10 @@ template std::basic_ostream & operator<< (std:: namespace detail { -#if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \ - ( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \ +#if ( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \ ( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) ) -// g++ 2.9x doesn't allow static_cast(void *) -// apparently EDG 2.38 and HP aCC A.03.35 also don't accept it +// EDG 2.38 and HP aCC A.03.35 don't allow static_cast(void *) template D * basic_get_deleter(shared_ptr const & p) {