forked from boostorg/exception
Bug ticket 3641, also merging other fixes from Trunk.
[SVN r57764]
This commit is contained in:
@ -11,6 +11,7 @@
|
|||||||
#include <ios>
|
#include <ios>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
boost
|
||||||
@ -21,11 +22,11 @@ boost
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline
|
inline
|
||||||
std::string
|
std::string
|
||||||
object_hex_dump( T const & x, size_t max_size=16 )
|
object_hex_dump( T const & x, std::size_t max_size=16 )
|
||||||
{
|
{
|
||||||
std::ostringstream s;
|
std::ostringstream s;
|
||||||
s << "type: " << type_name<T>() << ", size: " << sizeof(T) << ", dump: ";
|
s << "type: " << type_name<T>() << ", size: " << sizeof(T) << ", dump: ";
|
||||||
size_t n=sizeof(T)>max_size?max_size:sizeof(T);
|
std::size_t n=sizeof(T)>max_size?max_size:sizeof(T);
|
||||||
s.fill('0');
|
s.fill('0');
|
||||||
s.width(2);
|
s.width(2);
|
||||||
unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);
|
unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);
|
||||||
|
@ -303,7 +303,7 @@ boost
|
|||||||
struct
|
struct
|
||||||
enable_error_info_return_type
|
enable_error_info_return_type
|
||||||
{
|
{
|
||||||
typedef typename enable_error_info_helper<T,sizeof(dispatch((T*)0))>::type type;
|
typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch((T*)0))>::type type;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,6 +90,10 @@ boost
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~exception_ptr() throw()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
operator unspecified_bool_type() const
|
operator unspecified_bool_type() const
|
||||||
{
|
{
|
||||||
return _empty() ? 0 : &exception_ptr::bad_alloc_;
|
return _empty() ? 0 : &exception_ptr::bad_alloc_;
|
||||||
|
Reference in New Issue
Block a user