diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv index dd1ebdf8322..90142659a0c 100644 --- a/libstdc++-v3/include/std/charconv +++ b/libstdc++-v3/include/std/charconv @@ -688,7 +688,7 @@ namespace __detail operator^=(chars_format& __lhs, chars_format __rhs) noexcept { return __lhs = __lhs ^ __rhs; } -#if _GLIBCXX_HAVE_USELOCALE +#if _GLIBCXX_HAVE_USELOCALE && _GLIBCXX_USE_CXX11_ABI from_chars_result from_chars(const char* __first, const char* __last, float& __value, chars_format __fmt = chars_format::general) noexcept; diff --git a/libstdc++-v3/src/c++17/floating_from_chars.cc b/libstdc++-v3/src/c++17/floating_from_chars.cc index d52c0a937b9..36685c2d6f4 100644 --- a/libstdc++-v3/src/c++17/floating_from_chars.cc +++ b/libstdc++-v3/src/c++17/floating_from_chars.cc @@ -41,7 +41,7 @@ # include #endif -#if _GLIBCXX_HAVE_USELOCALE +#if _GLIBCXX_HAVE_USELOCALE && _GLIBCXX_USE_CXX11_ABI namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION diff --git a/libstdc++-v3/src/c++20/sstream-inst.cc b/libstdc++-v3/src/c++20/sstream-inst.cc index e04560d28c8..8c6840115c5 100644 --- a/libstdc++-v3/src/c++20/sstream-inst.cc +++ b/libstdc++-v3/src/c++20/sstream-inst.cc @@ -29,6 +29,7 @@ // Instantiations in this file are only for the new SSO std::string ABI #include +#if _GLIBCXX_USE_CXX11_ABI namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -106,3 +107,5 @@ basic_stringstream::view() const noexcept; _GLIBCXX_END_NAMESPACE_VERSION } + +#endif //_GLIBCXX_USE_CXX11_ABI