From 3a4dc43924cbf6be6378491cd16c2945d37cadbb Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 19 Feb 2008 14:26:36 +0000 Subject: [PATCH] Fix #398, as long as the macros BOOST_NO_STD_TYPEINFO and BOOST_NO_IOSTREAM are defined. I don't know how Boost.Config needs to be changed to autodetect eVC4 and set these on its own. [SVN r43318] --- include/boost/shared_ptr.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/boost/shared_ptr.hpp b/include/boost/shared_ptr.hpp index 5e1abd8..fa08d35 100644 --- a/include/boost/shared_ptr.hpp +++ b/include/boost/shared_ptr.hpp @@ -31,7 +31,14 @@ #include // for std::swap #include // for std::less #include // for std::bad_cast + +#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_NO_IOSFWD) #include // for std::basic_ostream +#else +#include +#endif +#endif #ifdef BOOST_MSVC // moved here to work around VC++ compiler crash # pragma warning(push) @@ -555,6 +562,8 @@ template inline T * get_pointer(shared_ptr const & p) // operator<< +#if !defined(BOOST_NO_IOSTREAM) + #if defined(__GNUC__) && (__GNUC__ < 3) template std::ostream & operator<< (std::ostream & os, shared_ptr const & p) @@ -584,6 +593,8 @@ template std::basic_ostream & operator<< (std:: #endif // __GNUC__ < 3 +#endif // !defined(BOOST_NO_IOSTREAM) + // get_deleter #if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \