diff options
Diffstat (limited to 'util/log.h')
-rw-r--r-- | util/log.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/log.h b/util/log.h index ff5edf983e5..7272affaff6 100644 --- a/util/log.h +++ b/util/log.h @@ -97,6 +97,15 @@ namespace mongo { return operator<<( static_cast<const void*>( t ) ); } template< class T > + Nullstream& operator<<(const shared_ptr<T> p ){ + T * t = p.get(); + if ( ! t ) + *this << "null"; + else + *this << t; + return *this; + } + template< class T > Nullstream& operator<<(const T &t) { return operator<<( static_cast<const LazyString&>( LazyStringImpl< T >( t ) ) ); } |