diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
---|---|---|
committer | <> | 2014-05-08 15:03:54 +0000 |
commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/libs/boost-1.37.0/boost/exception/to_string_stub.hpp | |
parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
download | VirtualBox-master.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/libs/boost-1.37.0/boost/exception/to_string_stub.hpp')
-rw-r--r-- | src/libs/boost-1.37.0/boost/exception/to_string_stub.hpp | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/src/libs/boost-1.37.0/boost/exception/to_string_stub.hpp b/src/libs/boost-1.37.0/boost/exception/to_string_stub.hpp deleted file mode 100644 index 1cd08bbc..00000000 --- a/src/libs/boost-1.37.0/boost/exception/to_string_stub.hpp +++ /dev/null @@ -1,100 +0,0 @@ -//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. - -//Distributed under the Boost Software License, Version 1.0. (See accompanying -//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef UUID_E788439ED9F011DCB181F25B55D89593 -#define UUID_E788439ED9F011DCB181F25B55D89593 - -#include <boost/exception/to_string.hpp> -#include <boost/exception/detail/object_hex_dump.hpp> -#include <boost/assert.hpp> - -namespace -boost - { - namespace - exception_detail - { - template <bool ToStringAvailable> - struct - to_string_dispatcher - { - template <class T,class Stub> - static - std::string - convert( T const & x, Stub ) - { - return to_string(x); - } - }; - - template <> - struct - to_string_dispatcher<false> - { - template <class T,class Stub> - static - std::string - convert( T const & x, Stub s ) - { - return s(x); - } - - template <class T> - static - std::string - convert( T const & x, std::string s ) - { - return s; - } - - template <class T> - static - std::string - convert( T const & x, char const * s ) - { - BOOST_ASSERT(s!=0); - return s; - } - }; - - namespace - to_string_dispatch - { - template <class T,class Stub> - inline - std::string - dispatch( T const & x, Stub s ) - { - return to_string_dispatcher<has_to_string<T>::value>::convert(x,s); - } - } - - template <class T> - inline - std::string - string_stub_dump( T const & x ) - { - return "[ " + exception_detail::object_hex_dump(x) + " ]"; - } - } - - template <class T> - inline - std::string - to_string_stub( T const & x ) - { - return exception_detail::to_string_dispatch::dispatch(x,&exception_detail::string_stub_dump<T>); - } - - template <class T,class Stub> - inline - std::string - to_string_stub( T const & x, Stub s ) - { - return exception_detail::to_string_dispatch::dispatch(x,s); - } - } - -#endif |