Work around g++'s instantiating X on typeid(X*)

This commit is contained in:
Peter Dimov committed 2021-10-08 09:44:23 +03:00
1 parent 41c3b6a7dd
commit 706747ab08
1 file changed
+8
+8
View File
@@ -160,7 +160,15 @@ template<class T> std::string typeid_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*>();
#endif
return r.substr( 0, r.find( '<' ) );
}