mirror of
https://github.com/boostorg/core.git
synced 2025-07-31 05:17:22 +02:00
Work around g++'s instantiating X on typeid(X*)
This commit is contained in:
@ -160,7 +160,15 @@ template<class T> std::string typeid_name()
|
|||||||
|
|
||||||
template<class T> std::string class_template_name()
|
template<class T> std::string class_template_name()
|
||||||
{
|
{
|
||||||
|
#if defined(BOOST_GCC)
|
||||||
|
|
||||||
|
std::string r = typeid_name<T()>();
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
std::string r = typeid_name<T*>();
|
std::string r = typeid_name<T*>();
|
||||||
|
|
||||||
|
#endif
|
||||||
return r.substr( 0, r.find( '<' ) );
|
return r.substr( 0, r.find( '<' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user