]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Define C++26 member visit for std::basic_format_arg [PR110356]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 16 Jul 2024 09:14:45 +0000 (10:14 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 31 Jul 2024 16:07:11 +0000 (17:07 +0100)
commit08782a5d92bacc3af947caf79d19bf25eae02e7b
treefd6e8f0affde9be31f87ef8822d58c08e53e97c7
parentf6f2c78d9db37228baa9d1f9926b0c120e24016f
libstdc++: Define C++26 member visit for std::basic_format_arg [PR110356]

Implement the std::format changes from P2637R3. This adds visit member
functions to std::basic_format_arg and deprecates the non-member
function std::visit_format_arg.

libstdc++-v3/ChangeLog:

PR libstdc++/110356
* include/bits/c++config (_GLIBCXX26_DEPRECATED): Define.
(_GLIBCXX26_DEPRECATED_SUGGEST): Define.
* include/bits/version.def (format): Update for C++26.
* include/bits/version.h: Regenerate.
* include/std/format (basic_format_arg::visit): New member
functions.
(visit_format_arg): Add deprecated attribute.
* testsuite/std/format/arguments/args.cc: Expect deprecated
warnings. Check member visit.
* testsuite/std/format/functions/format.cc: Update expected
value for __cpp_lib_format macro.
* testsuite/std/format/parse_ctx.cc: Add dg-warning for
deprecation.
libstdc++-v3/include/bits/c++config
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/include/std/format
libstdc++-v3/testsuite/std/format/arguments/args.cc
libstdc++-v3/testsuite/std/format/functions/format.cc
libstdc++-v3/testsuite/std/format/parse_ctx.cc