-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
-\r
-//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
-//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
-\r
-#ifndef UUID_C3E1741C754311DDB2834CCA55D89593\r
-#define UUID_C3E1741C754311DDB2834CCA55D89593\r
-\r
-#include <boost/detail/sp_typeinfo.hpp>\r
-#include <boost/current_function.hpp>\r
-\r
-namespace\r
-boost\r
- {\r
- template <class T>\r
- inline\r
- char const *\r
- tag_type_name()\r
- {\r
-#ifdef BOOST_NO_TYPEID\r
- return BOOST_CURRENT_FUNCTION;\r
-#else\r
- return typeid(T*).name();\r
-#endif\r
- }\r
-\r
- template <class T>\r
- inline\r
- char const *\r
- type_name()\r
- {\r
-#ifdef BOOST_NO_TYPEID\r
- return BOOST_CURRENT_FUNCTION;\r
-#else\r
- return typeid(T).name();\r
-#endif\r
- }\r
-\r
- namespace\r
- exception_detail\r
- {\r
-#ifdef BOOST_NO_TYPEID\r
- struct\r
- type_info_\r
- {\r
- detail::sp_typeinfo type_;\r
- char const * name_;\r
-\r
- explicit\r
- type_info_( detail::sp_typeinfo type, char const * name ):\r
- type_(type),\r
- name_(name)\r
- {\r
- }\r
-\r
- friend\r
- bool\r
- operator==( type_info_ const & a, type_info_ const & b )\r
- {\r
- return a.type_==b.type_;\r
- }\r
-\r
- friend\r
- bool\r
- operator<( type_info_ const & a, type_info_ const & b )\r
- {\r
- return a.type_<b.type_;\r
- }\r
-\r
- char const *\r
- name() const\r
- {\r
- return name_;\r
- }\r
- };\r
-#else\r
- struct\r
- type_info_\r
- {\r
- detail::sp_typeinfo const * type_;\r
-\r
- explicit\r
- type_info_( detail::sp_typeinfo const & type ):\r
- type_(&type)\r
- {\r
- }\r
-\r
- type_info_( detail::sp_typeinfo const & type, char const * ):\r
- type_(&type)\r
- {\r
- }\r
-\r
- friend\r
- bool\r
- operator==( type_info_ const & a, type_info_ const & b )\r
- {\r
- return (*a.type_)==(*b.type_);\r
- }\r
-\r
- friend\r
- bool\r
- operator<( type_info_ const & a, type_info_ const & b )\r
- {\r
- return 0!=(a.type_->before(*b.type_));\r
- }\r
-\r
- char const *\r
- name() const\r
- {\r
- return type_->name();\r
- }\r
- };\r
-#endif\r
-\r
- inline\r
- bool\r
- operator!=( type_info_ const & a, type_info_ const & b )\r
- {\r
- return !(a==b);\r
- }\r
- }\r
- }\r
-\r
-#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T),::boost::tag_type_name<T>())\r
-\r
-#ifndef BOOST_NO_RTTI\r
-#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))\r
-#endif\r
-\r
-#endif\r
+//Copyright (c) 2006-2009 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_C3E1741C754311DDB2834CCA55D89593
+#define UUID_C3E1741C754311DDB2834CCA55D89593
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/current_function.hpp>
+
+namespace
+boost
+ {
+ template <class T>
+ inline
+ char const *
+ tag_type_name()
+ {
+#ifdef BOOST_NO_TYPEID
+ return BOOST_CURRENT_FUNCTION;
+#else
+ return typeid(T*).name();
+#endif
+ }
+
+ template <class T>
+ inline
+ char const *
+ type_name()
+ {
+#ifdef BOOST_NO_TYPEID
+ return BOOST_CURRENT_FUNCTION;
+#else
+ return typeid(T).name();
+#endif
+ }
+
+ namespace
+ exception_detail
+ {
+#ifdef BOOST_NO_TYPEID
+ struct
+ type_info_
+ {
+ detail::sp_typeinfo type_;
+ char const * name_;
+
+ explicit
+ type_info_( detail::sp_typeinfo type, char const * name ):
+ type_(type),
+ name_(name)
+ {
+ }
+
+ friend
+ bool
+ operator==( type_info_ const & a, type_info_ const & b )
+ {
+ return a.type_==b.type_;
+ }
+
+ friend
+ bool
+ operator<( type_info_ const & a, type_info_ const & b )
+ {
+ return a.type_<b.type_;
+ }
+
+ char const *
+ name() const
+ {
+ return name_;
+ }
+ };
+#else
+ struct
+ type_info_
+ {
+ detail::sp_typeinfo const * type_;
+
+ explicit
+ type_info_( detail::sp_typeinfo const & type ):
+ type_(&type)
+ {
+ }
+
+ type_info_( detail::sp_typeinfo const & type, char const * ):
+ type_(&type)
+ {
+ }
+
+ friend
+ bool
+ operator==( type_info_ const & a, type_info_ const & b )
+ {
+ return (*a.type_)==(*b.type_);
+ }
+
+ friend
+ bool
+ operator<( type_info_ const & a, type_info_ const & b )
+ {
+ return 0!=(a.type_->before(*b.type_));
+ }
+
+ char const *
+ name() const
+ {
+ return type_->name();
+ }
+ };
+#endif
+
+ inline
+ bool
+ operator!=( type_info_ const & a, type_info_ const & b )
+ {
+ return !(a==b);
+ }
+ }
+ }
+
+#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T),::boost::tag_type_name<T>())
+
+#ifndef BOOST_NO_RTTI
+#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))
+#endif
+
+#endif