]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: [_GLIBCXX_INLINE_VERSION] Fix <format> friend declaration
authorFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 23 Aug 2023 17:15:43 +0000 (19:15 +0200)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 27 Sep 2023 14:00:49 +0000 (15:00 +0100)
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)

libstdc++-v3/include/std/format

index 3721f021afdac4c57d60ae2e40bc34a2ad5e565a..27d33cb759fb5103cbd375d30b28273b2230c758 100644 (file)
@@ -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.