https://gcc.gnu.org/g:be56fee60a62014709605af19a84a48b7aa0835a

commit r14-10818-gbe56fee60a62014709605af19a84a48b7aa0835a
Author: Patrick Palka <ppa...@redhat.com>
Date:   Thu Aug 22 11:25:10 2024 -0400

    libstdc++: Add some missing ranges feature-test macro tests
    
    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/25_algorithms/iota/1.cc: Verify value of
            __cpp_lib_ranges_iota.
    
    Reviewed-by: Jonathan Wakely <jwak...@redhat.com>
    (cherry picked from commit 8e0da56f18b3678beee9d2bae27e08a0e122573a)

Diff:
---
 libstdc++-v3/testsuite/25_algorithms/contains/1.cc  | 4 ++++
 libstdc++-v3/testsuite/25_algorithms/find_last/1.cc | 4 ++++
 libstdc++-v3/testsuite/25_algorithms/iota/1.cc      | 5 +++++
 3 files changed, 13 insertions(+)

diff --git a/libstdc++-v3/testsuite/25_algorithms/contains/1.cc 
b/libstdc++-v3/testsuite/25_algorithms/contains/1.cc
index 7d3fa048ef61..b44c06032e8a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/contains/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/contains/1.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc 
b/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc
index 911e22887d1d..8a40bb1a6b36 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find_last/1.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/25_algorithms/iota/1.cc 
b/libstdc++-v3/testsuite/25_algorithms/iota/1.cc
index 61bf418b4dae..ebadeee79a13 100644
--- a/libstdc++-v3/testsuite/25_algorithms/iota/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/iota/1.cc
@@ -1,9 +1,14 @@
 // { dg-do run { target c++23 } }
 
 #include <algorithm>
+#include <numeric>
 #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

Reply via email to