Fix operator<< for shared_ptr and intrusive_ptr. Fixes #115.

This commit is contained in:
Peter Dimov
2025-01-13 16:13:04 +02:00
parent 785a17aaaf
commit e7433ba545
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;