Skip to content

Commit

Permalink
Fix operator<< for shared_ptr and intrusive_ptr. Fixes #115.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 13, 2025
1 parent 785a17a commit e7433ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/boost/smart_ptr/intrusive_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/boost/smart_ptr/shared_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e7433ba

Please sign in to comment.