public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7917] libstdc++: [_GLIBCXX_INLINE_VERSION] Fix <format> friend declaration
@ 2023-09-27 16:17 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-09-27 16:17 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:0547f663ee09aa5887dcd1bb0ea48eba24a30485

commit r13-7917-g0547f663ee09aa5887dcd1bb0ea48eba24a30485
Author: François Dumont <fdumont@gcc.gnu.org>
Date:   Wed Aug 23 19:15:43 2023 +0200

    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)

Diff:
---
 libstdc++-v3/include/std/format | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-27 16:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 16:17 [gcc r13-7917] libstdc++: [_GLIBCXX_INLINE_VERSION] Fix <format> friend declaration Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).