mirror of
https://github.com/boostorg/core.git
synced 2025-07-30 04:47:24 +02:00
Fix std::ostream failure on libstdc++
This commit is contained in:
@ -21,6 +21,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <iosfwd>
|
||||||
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
|
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
|
||||||
# include <string_view>
|
# include <string_view>
|
||||||
#endif
|
#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>() ) + '>';
|
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)
|
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
|
||||||
|
|
||||||
inline std::string type_name( tn_identity<std::string_view> )
|
inline std::string type_name( tn_identity<std::string_view> )
|
||||||
|
@ -193,7 +193,7 @@ int main()
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TEST(std::basic_ostream<char>);
|
TEST(std::ostream);
|
||||||
TEST(std::basic_ostream<wchar_t>);
|
TEST(std::basic_ostream<wchar_t>);
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
|
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
|
||||||
|
Reference in New Issue
Block a user