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_E788439ED9F011DCB181F25B55D89593
7 #define UUID_E788439ED9F011DCB181F25B55D89593
8 #if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
9 #pragma GCC system_header
11 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
12 #pragma warning(push,1)
15 #include <boost/exception/to_string.hpp>
16 #include <boost/exception/detail/object_hex_dump.hpp>
17 #include <boost/assert.hpp>
25 template <bool ToStringAvailable>
29 template <class T,class Stub>
32 convert( T const & x, Stub )
40 to_string_dispatcher<false>
42 template <class T,class Stub>
45 convert( T const & x, Stub s )
53 convert( T const & x, std::string s )
61 convert( T const & x, char const * s )
71 template <class T,class Stub>
74 dispatch( T const & x, Stub s )
76 return to_string_dispatcher<has_to_string<T>::value>::convert(x,s);
83 string_stub_dump( T const & x )
85 return "[ " + exception_detail::object_hex_dump(x) + " ]";
92 to_string_stub( T const & x )
94 return exception_detail::to_string_dispatch::dispatch(x,&exception_detail::string_stub_dump<T>);
97 template <class T,class Stub>
100 to_string_stub( T const & x, Stub s )
102 return exception_detail::to_string_dispatch::dispatch(x,s);
106 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)