From: Patrick Palka Date: Thu, 22 Aug 2024 15:24:07 +0000 (-0400) Subject: libstdc++: Add some missing ranges feature-test macro tests X-Git-Tag: basepoints/gcc-16~6459 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e0da56f18b3678beee9d2bae27e08a0e122573a;p=thirdparty%2Fgcc.git 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/26_numerics/iota/2.cc: Verify value of __cpp_lib_ranges_iota. Reviewed-by: Jonathan Wakely --- 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 #include +#if __cpp_lib_ranges_contains != 202207L +# error "Feature-test macro __cpp_lib_ranges_contains has wrong value in " +#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 #include +#if __cpp_lib_ranges_find_last != 202207L +# error "Feature-test macro __cpp_lib_ranges_find_last has wrong value in " +#endif + namespace ranges = std::ranges; constexpr bool diff --git a/libstdc++-v3/testsuite/26_numerics/iota/2.cc b/libstdc++-v3/testsuite/26_numerics/iota/2.cc index 040c48d91ce2..b14580b8be19 100644 --- a/libstdc++-v3/testsuite/26_numerics/iota/2.cc +++ b/libstdc++-v3/testsuite/26_numerics/iota/2.cc @@ -4,6 +4,10 @@ #include #include +#if __cpp_lib_ranges_iota != 202202L +# error "Feature-test macro __cpp_lib_ranges_iota has wrong value in " +#endif + namespace ranges = std::ranges; void