aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/std/ranges
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2024-08-22 09:24:11 -0400
committerPatrick Palka <ppalka@redhat.com>2024-08-22 09:24:11 -0400
commitb552730faf36f1eae1dc6e73ccc93a016dec5401 (patch)
tree93377445ca094cd9dde66ffae5cdadef7fea61ae /libstdc++-v3/testsuite/std/ranges
parenta98dd536b1017c2b814a3465206c6c01b2890998 (diff)
downloadgcc-b552730faf36f1eae1dc6e73ccc93a016dec5401.zip
gcc-b552730faf36f1eae1dc6e73ccc93a016dec5401.tar.gz
gcc-b552730faf36f1eae1dc6e73ccc93a016dec5401.tar.bz2
libstdc++: Implement P2609R3 changes to the indirect invocability concepts
This implements the changes of this C++23 paper as a DR against C++20. Note that after the later P2538R1 "ADL-proof std::projected" (which we already implement), we can't use a simple partial specialization to match specializations of the 'projected' alias template. So instead we identify such specializations using a pair of distinguishing member aliases. libstdc++-v3/ChangeLog: * include/bits/iterator_concepts.h (__detail::__indirect_value): Define. (__indirect_value_t): Define as per P2609R3. (iter_common_reference_t): Adjust as per P2609R3. (indirectly_unary_invocable): Likewise. (indirectly_regular_unary_invocable): Likewise. (indirect_unary_predicate): Likewise. (indirect_binary_predicate): Likewise. (indirect_equivalence_relation): Likewise. (indirect_strict_weak_order): Likewise. (__detail::__projected::__type): Define member aliases __projected_Iter and __projected_Proj providing the template arguments of the current specialization. * include/bits/version.def (ranges): Update value. * include/bits/version.h: Regenerate. * testsuite/24_iterators/indirect_callable/p2609r3.cc: New test. * testsuite/std/ranges/version_c++23.cc: Update expected value of __cpp_lib_ranges macro. Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Diffstat (limited to 'libstdc++-v3/testsuite/std/ranges')
-rw-r--r--libstdc++-v3/testsuite/std/ranges/version_c++23.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/std/ranges/version_c++23.cc b/libstdc++-v3/testsuite/std/ranges/version_c++23.cc
index d475d3d..0187115 100644
--- a/libstdc++-v3/testsuite/std/ranges/version_c++23.cc
+++ b/libstdc++-v3/testsuite/std/ranges/version_c++23.cc
@@ -4,7 +4,7 @@
#include <version>
#if __STDC_HOSTED__
-# if __cpp_lib_ranges != 202211L
+# if __cpp_lib_ranges != 202302L
# error "Feature-test macro __cpp_lib_ranges has wrong value in <version>"
# endif
#endif