Boost logo

Boost-Commit :

From: jared_at_[hidden]
Date: 2007-05-24 23:35:25


Author: jared
Date: 2007-05-24 23:35:25 EDT (Thu, 24 May 2007)
New Revision: 4240
URL: http://svn.boost.org/trac/boost/changeset/4240

Log:
Prints "null" for NULL pointers.

Text files modified:
   sandbox/explore/boost/explore/explore.hpp | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: sandbox/explore/boost/explore/explore.hpp
==============================================================================
--- sandbox/explore/boost/explore/explore.hpp (original)
+++ sandbox/explore/boost/explore/explore.hpp 2007-05-24 23:35:25 EDT (Thu, 24 May 2007)
@@ -301,6 +301,11 @@
>
                 static std::ostream &print_item( const item_type *item, std::ostream &stream )
         {
+ if( NULL == item )
+ {
+ return stream << "null";
+ }
+
                         return print(*item, stream, format_type(), container_policy_type());
         }
         };


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk