aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2023-08-23 19:15:43 +0200
committerJonathan Wakely <jwakely@redhat.com>2023-09-27 15:00:49 +0100
commit0547f663ee09aa5887dcd1bb0ea48eba24a30485 (patch)
treee1c0a77fde1fc59cc12329262640674ff27a74b3
parent183eea6029be2f6c9f416d6ffe751c469237ff2d (diff)
libstdc++: [_GLIBCXX_INLINE_VERSION] Fix <format> friend declaration
GCC do not consider the inline namespace in friend function declarations. This is PR c++/59526, we need to explicit this namespace. libstdc++-v3/ChangeLog: * include/std/format (std::__format::_Arg_store): Explicit version namespace on make_format_args friend declaration. (cherry picked from commit 92456291849fe88303bbcab366f41dcd4a885ad5)
-rw-r--r--libstdc++-v3/include/std/format8
1 files changed, 7 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format
index 3721f021afd..27d33cb759f 100644
--- a/libstdc++-v3/include/std/format
+++ b/libstdc++-v3/include/std/format
@@ -3299,7 +3299,13 @@ namespace __format
template<typename _Ctx, typename... _Argz>
friend auto
- std::make_format_args(_Argz&&...) noexcept;
+#if _GLIBCXX_INLINE_VERSION
+ // Needed for PR c++/59526
+ std::__8::
+#else
+ std::
+#endif
+ make_format_args(_Argz&&...) noexcept;
// For a sufficiently small number of arguments we only store values.
// basic_format_args can get the types from the _Args pack.