diff --git a/include/boost/exception/detail/type_info.hpp b/include/boost/exception/detail/type_info.hpp index 1e928fd..97bf726 100644 --- a/include/boost/exception/detail/type_info.hpp +++ b/include/boost/exception/detail/type_info.hpp @@ -8,13 +8,22 @@ #include #include -#ifndef BOOST_NO_TYPEID -#include -#endif namespace boost { + template + inline + char const * + tag_type_name() + { +#ifdef BOOST_NO_TYPEID + return BOOST_CURRENT_FUNCTION; +#else + return typeid(T*).name(); +#endif + } + template inline char const * @@ -23,7 +32,7 @@ boost #ifdef BOOST_NO_TYPEID return BOOST_CURRENT_FUNCTION; #else - return typeid(type).name(); + return typeid(T).name(); #endif } @@ -112,7 +121,7 @@ boost } } -#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T),::boost::type_name()) +#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T),::boost::tag_type_name()) #ifndef BOOST_NO_RTTI #define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x)) diff --git a/include/boost/exception/info.hpp b/include/boost/exception/info.hpp index fbe6d68..a0892c9 100644 --- a/include/boost/exception/info.hpp +++ b/include/boost/exception/info.hpp @@ -36,7 +36,7 @@ boost error_info:: tag_typeid_name() const { - return type_name(); + return tag_type_name(); } template