]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: Add some missing ranges feature-test macro tests
authorPatrick Palka <ppalka@redhat.com>
Thu, 22 Aug 2024 15:24:07 +0000 (11:24 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 22 Aug 2024 15:24:07 +0000 (11:24 -0400)
libstdc++-v3/ChangeLog:

* testsuite/25_algorithms/contains/1.cc: Verify value of
__cpp_lib_ranges_contains.
* testsuite/25_algorithms/find_last/1.cc: Verify value of
__cpp_lib_ranges_find_last.
* testsuite/26_numerics/iota/2.cc: Verify value of
__cpp_lib_ranges_iota.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/testsuite/25_algorithms/contains/1.cc
libstdc++-v3/testsuite/25_algorithms/find_last/1.cc
libstdc++-v3/testsuite/26_numerics/iota/2.cc

index 7d3fa048ef6118fd71ba5f2f6960f6ad64b8df4a..b44c06032e8ade185db43f96641706e12d4bc171 100644 (file)
@@ -4,6 +4,10 @@
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
 
+#if __cpp_lib_ranges_contains != 202207L
+# error "Feature-test macro __cpp_lib_ranges_contains has wrong value in <algorithm>"
+#endif
+
 namespace ranges = std::ranges;
 
 void
index 911e22887d1d86f79eeaf898ad1908ccce6d7d69..8a40bb1a6b36d4b3220c8f227208d7df4c93b6dc 100644 (file)
@@ -4,6 +4,10 @@
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
 
+#if __cpp_lib_ranges_find_last != 202207L
+# error "Feature-test macro __cpp_lib_ranges_find_last has wrong value in <algorithm>"
+#endif
+
 namespace ranges = std::ranges;
 
 constexpr bool
index 040c48d91ce21559420c49c1143a8f156937d936..b14580b8be19fb81120ca3f26e8ce8139bd1fc09 100644 (file)
@@ -4,6 +4,10 @@
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
 
+#if __cpp_lib_ranges_iota != 202202L
+# error "Feature-test macro __cpp_lib_ranges_iota has wrong value in <numeric>"
+#endif
+
 namespace ranges = std::ranges;
 
 void
This page took 0.064535 seconds and 5 git commands to generate.