1 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef UUID_6F463AC838DF11DDA3E6909F56D89593
7 #define UUID_6F463AC838DF11DDA3E6909F56D89593
9 #include <boost/exception/detail/type_info.hpp>
24 object_hex_dump( T const & x, size_t max_size=16 )
27 s << "type: " << type_name<T>() << ", size: " << sizeof(T) << ", dump: ";
28 size_t n=sizeof(T)>max_size?max_size:sizeof(T);
31 unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);
32 s << std::setw(2) << std::hex << (unsigned int)*b;
33 for( unsigned char const * e=b+n; ++b!=e; )
34 s << " " << std::setw(2) << std::hex << (unsigned int)*b;