Skip to content

Commit e7433ba

Browse files
committed
Fix operator<< for shared_ptr and intrusive_ptr. Fixes #115.
1 parent 785a17a commit e7433ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/boost/smart_ptr/intrusive_ptr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast( intrusive_ptr<
285285

286286
// operator<<
287287

288-
template<class Y> std::ostream & operator<< (std::ostream & os, intrusive_ptr<Y> const & p)
288+
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, intrusive_ptr<Y> const & p)
289289
{
290290
os << p.get();
291291
return os;

include/boost/smart_ptr/shared_ptr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shar
775775

776776
// operator<<
777777

778-
template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)
778+
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
779779
{
780780
os << p.get();
781781
return os;

0 commit comments

Comments
 (0)