]> 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)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 13 Sep 2023 20:37:18 +0000 (22:37 +0200)
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.

libstdc++-v3/include/std/format

index 128a5b79282e17979968ebfe68d9e81f3cf7620a..1e7172575ecc4924fb79e15369d4df868f270d10 100644 (file)
@@ -3437,7 +3437,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.