forked from boostorg/smart_ptr
Fix operator<< for shared_ptr and intrusive_ptr. Fixes #115.
This commit is contained in:
@ -285,7 +285,7 @@ template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast( intrusive_ptr<
|
||||
|
||||
// operator<<
|
||||
|
||||
template<class Y> std::ostream & operator<< (std::ostream & os, intrusive_ptr<Y> const & p)
|
||||
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, intrusive_ptr<Y> const & p)
|
||||
{
|
||||
os << p.get();
|
||||
return os;
|
||||
|
@ -775,7 +775,7 @@ template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shar
|
||||
|
||||
// operator<<
|
||||
|
||||
template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)
|
||||
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;
|
||||
|
Reference in New Issue
Block a user