mirror of
https://github.com/boostorg/exception.git
synced 2025-07-25 01:57:38 +02:00
minor type_info.hpp change
[SVN r48642]
This commit is contained in:
@ -8,13 +8,22 @@
|
|||||||
|
|
||||||
#include <boost/detail/sp_typeinfo.hpp>
|
#include <boost/detail/sp_typeinfo.hpp>
|
||||||
#include <boost/current_function.hpp>
|
#include <boost/current_function.hpp>
|
||||||
#ifndef BOOST_NO_TYPEID
|
|
||||||
#include <boost/type.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
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>
|
template <class T>
|
||||||
inline
|
inline
|
||||||
char const *
|
char const *
|
||||||
@ -23,7 +32,7 @@ boost
|
|||||||
#ifdef BOOST_NO_TYPEID
|
#ifdef BOOST_NO_TYPEID
|
||||||
return BOOST_CURRENT_FUNCTION;
|
return BOOST_CURRENT_FUNCTION;
|
||||||
#else
|
#else
|
||||||
return typeid(type<T>).name();
|
return typeid(T).name();
|
||||||
#endif
|
#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
|
#ifndef BOOST_NO_RTTI
|
||||||
#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))
|
#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))
|
||||||
|
@ -36,7 +36,7 @@ boost
|
|||||||
error_info<Tag,T>::
|
error_info<Tag,T>::
|
||||||
tag_typeid_name() const
|
tag_typeid_name() const
|
||||||
{
|
{
|
||||||
return type_name<Tag>();
|
return tag_type_name<Tag>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tag,class T>
|
template <class Tag,class T>
|
||||||
|
Reference in New Issue
Block a user