]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement P2997R1 changes to the indirect invocability concepts
authorPatrick Palka <ppalka@redhat.com>
Thu, 22 Aug 2024 13:24:20 +0000 (09:24 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 22 Oct 2024 01:13:04 +0000 (21:13 -0400)
commit0b2f2a7e126cf8017626793446110aac892b00f6
treee053977e6f1f2891dea7fe89677e05d5373178e5
parent3795ac860bc6f24d0ef222045dff7b2a6350a8c4
libstdc++: Implement P2997R1 changes to the indirect invocability concepts

This implements the changes of this C++26 paper as a DR against C++20.

In passing this patch removes the std/ranges/version_c++23.cc test which
is now mostly obsolete after the version.def FTM refactoring, and instead
expands the __cpp_lib_ranges checks in another test so that it verifies
the exact value of the FTM on a per language version basis.

libstdc++-v3/ChangeLog:

* include/bits/iterator_concepts.h (indirectly_unary_invocable):
Relax as per P2997R1.
(indirectly_regular_unary_invocable): Likewise.
(indirect_unary_predicate): Likewise.
(indirect_binary_predicate): Likewise.
(indirect_equivalence_relation): Likewise.
(indirect_strict_weak_order): Likewise.
* include/bits/version.def (ranges): Update value for C++26.
* include/bits/version.h: Regenerate.
* testsuite/24_iterators/indirect_callable/p2997r1.cc: New test.
* testsuite/std/ranges/version_c++23.cc: Remove.
* testsuite/std/ranges/headers/ranges/synopsis.cc: Refine the
__cpp_lib_ranges checks.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
(cherry picked from commit 620232426bd83a79c81cd2be6f485834c618e920)
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/testsuite/24_iterators/indirect_callable/p2997r1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
libstdc++-v3/testsuite/std/ranges/version_c++23.cc [deleted file]