Some versions of g++ 2.9x don't have basic_ostream.

[SVN r16406]
This commit is contained in:
Peter Dimov
2002-11-25 13:52:42 +00:00
parent 72bcb8ff46
commit e60c1f9b49

View File

@ -374,12 +374,24 @@ template<class T> inline T * get_pointer(shared_ptr<T> const & p)
// operator<<
#if defined(__GNUC__) && (__GNUC__ < 3)
template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)
{
os << p.get();
return os;
}
#else
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
{
os << p.get();
return os;
}
#endif
// get_deleter (experimental)
#if defined(__GNUC__) && (__GNUC__ < 3)