minor type_info.hpp change

[SVN r48642]
This commit is contained in:
Emil Dotchevski
2008-09-07 00:05:00 +00:00
parent c37744a228
commit b5fc84025b
2 changed files with 15 additions and 6 deletions

View File

@ -8,13 +8,22 @@
#include <boost/detail/sp_typeinfo.hpp>
#include <boost/current_function.hpp>
#ifndef BOOST_NO_TYPEID
#include <boost/type.hpp>
#endif
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 *
@ -23,7 +32,7 @@ boost
#ifdef BOOST_NO_TYPEID
return BOOST_CURRENT_FUNCTION;
#else
return typeid(type<T>).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<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))

View File

@ -36,7 +36,7 @@ boost
error_info<Tag,T>::
tag_typeid_name() const
{
return type_name<Tag>();
return tag_type_name<Tag>();
}
template <class Tag,class T>