diff --git a/include/boost/core/type_name.hpp b/include/boost/core/type_name.hpp index 93927fe..9a82dd3 100644 --- a/include/boost/core/type_name.hpp +++ b/include/boost/core/type_name.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) # include #endif @@ -501,6 +502,12 @@ template class L, class Ch> std::string type_name( return tn + '<' + type_name( tn_identity() ) + '>'; } +// needed for libstdc++ +inline std::string type_name( tn_identity ) +{ + return "std::ostream"; +} + #if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) inline std::string type_name( tn_identity ) diff --git a/test/type_name_test.cpp b/test/type_name_test.cpp index 61132cd..6ab08f5 100644 --- a/test/type_name_test.cpp +++ b/test/type_name_test.cpp @@ -193,7 +193,7 @@ int main() #endif - TEST(std::basic_ostream); + TEST(std::ostream); TEST(std::basic_ostream); #if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)