Fix std::ostream failure on libstdc++

This commit is contained in:
Peter Dimov
2021-10-01 15:51:13 +03:00
parent e260bb865d
commit 5e382efa84
2 changed files with 8 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include <utility>
#include <cstdio>
#include <cstddef>
#include <iosfwd>
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
# include <string_view>
#endif
@ -501,6 +502,12 @@ template<template<class Ch, class Tr> class L, class Ch> std::string type_name(
return tn + '<' + type_name( tn_identity<Ch>() ) + '>';
}
// needed for libstdc++
inline std::string type_name( tn_identity<std::ostream> )
{
return "std::ostream";
}
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
inline std::string type_name( tn_identity<std::string_view> )

View File

@ -193,7 +193,7 @@ int main()
#endif
TEST(std::basic_ostream<char>);
TEST(std::ostream);
TEST(std::basic_ostream<wchar_t>);
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)