From 06023d4ffead2b476e010e2fdaa0f286943e0a03 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 29 Sep 2021 19:34:37 +0300 Subject: [PATCH] Strip libstdc++ and libc++ inline namespaces --- include/boost/core/type_name.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/boost/core/type_name.hpp b/include/boost/core/type_name.hpp index 6b139a2..7d47faf 100644 --- a/include/boost/core/type_name.hpp +++ b/include/boost/core/type_name.hpp @@ -57,6 +57,20 @@ template std::string typeid_name() #endif + // libc++ inline namespace + + if( r.substr( 0, 10 ) == "std::__1::" ) + { + r = "std::" + r.substr( 10 ); + } + + // libstdc++ inline namespace + + if( r.substr( 0, 14 ) == "std::__cxx11::" ) + { + r = "std::" + r.substr( 14 ); + } + return r; }