Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48642 - in trunk/boost/exception: . detail
From: emil_at_[hidden]
Date: 2008-09-06 20:05:01


Author: emildotchevski
Date: 2008-09-06 20:05:00 EDT (Sat, 06 Sep 2008)
New Revision: 48642
URL: http://svn.boost.org/trac/boost/changeset/48642

Log:
minor type_info.hpp change
Text files modified:
   trunk/boost/exception/detail/type_info.hpp | 19 ++++++++++++++-----
   trunk/boost/exception/info.hpp | 2 +-
   2 files changed, 15 insertions(+), 6 deletions(-)

Modified: trunk/boost/exception/detail/type_info.hpp
==============================================================================
--- trunk/boost/exception/detail/type_info.hpp (original)
+++ trunk/boost/exception/detail/type_info.hpp 2008-09-06 20:05:00 EDT (Sat, 06 Sep 2008)
@@ -8,9 +8,6 @@
 
 #include <boost/detail/sp_typeinfo.hpp>
 #include <boost/current_function.hpp>
-#ifndef BOOST_NO_TYPEID
-#include <boost/type.hpp>
-#endif
 
 namespace
 boost
@@ -18,12 +15,24 @@
     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(type<T>).name();
+ return typeid(T).name();
 #endif
         }
 
@@ -112,7 +121,7 @@
         }
     }
 
-#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T),::boost::type_name<T>())
+#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))

Modified: trunk/boost/exception/info.hpp
==============================================================================
--- trunk/boost/exception/info.hpp (original)
+++ trunk/boost/exception/info.hpp 2008-09-06 20:05:00 EDT (Sat, 06 Sep 2008)
@@ -36,7 +36,7 @@
     error_info<Tag,T>::
     tag_typeid_name() const
         {
- return type_name<Tag>();
+ return tag_type_name<Tag>();
         }
 
     template <class Tag,class T>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk