forked from boostorg/smart_ptr
Some versions of g++ 2.9x don't have basic_ostream.
[SVN r16406]
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user