From d2c24075850aa8c6939b0cc690edeb741e733f1a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 24 Sep 2024 18:30:06 +0300 Subject: [PATCH] Remove uses of BOOST_NO_IOSTREAM et al --- include/boost/smart_ptr/intrusive_ptr.hpp | 44 ++------------------ include/boost/smart_ptr/local_shared_ptr.hpp | 4 -- include/boost/smart_ptr/shared_ptr.hpp | 34 --------------- 3 files changed, 4 insertions(+), 78 deletions(-) diff --git a/include/boost/smart_ptr/intrusive_ptr.hpp b/include/boost/smart_ptr/intrusive_ptr.hpp index d2cd6c9f81..4ebc416494 100644 --- a/include/boost/smart_ptr/intrusive_ptr.hpp +++ b/include/boost/smart_ptr/intrusive_ptr.hpp @@ -13,24 +13,15 @@ // See http://www.boost.org/libs/smart_ptr/ for documentation. // -#include - -#include -#include #include #include #include +#include +#include +#include -#include // for std::less - -#if !defined(BOOST_NO_IOSTREAM) -#if !defined(BOOST_NO_IOSFWD) +#include // for std::less #include // for std::basic_ostream -#else -#include -#endif -#endif - namespace boost { @@ -330,39 +321,12 @@ template intrusive_ptr dynamic_pointer_cast( intrusive_ptr< // operator<< -#if !defined(BOOST_NO_IOSTREAM) - -#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) - template 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 - -# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) -// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL -using std::basic_ostream; -template basic_ostream & operator<< (basic_ostream & os, intrusive_ptr const & p) -# else -template std::basic_ostream & operator<< (std::basic_ostream & os, intrusive_ptr const & p) -# endif -{ - os << p.get(); - return os; -} - -#endif // _STLP_NO_IOSTREAMS - -#endif // __GNUC__ < 3 - -#endif // !defined(BOOST_NO_IOSTREAM) - // hash_value template< class T > struct hash; diff --git a/include/boost/smart_ptr/local_shared_ptr.hpp b/include/boost/smart_ptr/local_shared_ptr.hpp index 86c94d5c2c..54cd6fa524 100644 --- a/include/boost/smart_ptr/local_shared_ptr.hpp +++ b/include/boost/smart_ptr/local_shared_ptr.hpp @@ -660,16 +660,12 @@ template inline typename local_shared_ptr::element_type * get_pointe // operator<< -#if !defined(BOOST_NO_IOSTREAM) - template std::basic_ostream & operator<< ( std::basic_ostream & os, local_shared_ptr const & p ) { os << p.get(); return os; } -#endif // !defined(BOOST_NO_IOSTREAM) - // get_deleter template D * get_deleter( local_shared_ptr const & p ) BOOST_SP_NOEXCEPT diff --git a/include/boost/smart_ptr/shared_ptr.hpp b/include/boost/smart_ptr/shared_ptr.hpp index 9b40c43388..3f1d5646b6 100644 --- a/include/boost/smart_ptr/shared_ptr.hpp +++ b/include/boost/smart_ptr/shared_ptr.hpp @@ -34,14 +34,7 @@ #include // for std::bad_cast #include // for std::size_t #include // for std::auto_ptr - -#if !defined(BOOST_NO_IOSTREAM) -#if !defined(BOOST_NO_IOSFWD) #include // for std::basic_ostream -#else -#include -#endif -#endif #if defined( BOOST_SP_DISABLE_DEPRECATED ) #pragma GCC diagnostic push @@ -1001,39 +994,12 @@ template inline typename shared_ptr::element_type * get_pointer(shar // operator<< -#if !defined(BOOST_NO_IOSTREAM) - -#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( 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 - -# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) -// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL -using std::basic_ostream; -template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p) -# else -template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) -# endif -{ - os << p.get(); - return os; -} - -#endif // _STLP_NO_IOSTREAMS - -#endif // __GNUC__ < 3 - -#endif // !defined(BOOST_NO_IOSTREAM) - // get_deleter namespace detail