From 3f5310831bba6a1a74e68b7711ca4bb9ec4ff6d6 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 11 Feb 2025 09:36:21 +0100 Subject: [PATCH] [libc++] Remove obsolete guards for join_view being experimental These TODOs were forgotten when join_view was made non-experimental. By removing these checks, we slightly increase the coverage of the test suite. --- .../std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp | 4 +--- .../algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp | 4 +--- .../algorithms/alg.nonmodifying/alg.foreach/for_each.pass.cpp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp index c41246522fdeb..2dbad321b782e 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp @@ -215,9 +215,7 @@ TEST_CONSTEXPR_CXX20 bool test() { Test, TriviallyComparable>().operator()*>(); #endif - // TODO: Remove the `_LIBCPP_ENABLE_EXPERIMENTAL` check once we have the FTM guarded or views::join isn't - // experimental anymore -#if TEST_STD_VER >= 20 && (!defined(_LIBCPP_VERSION) || defined(_LIBCPP_ENABLE_EXPERIMENTAL)) +#if TEST_STD_VER >= 20 { std::vector> vec = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto view = vec | std::views::join; diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp index 4ae049c3ec001..760ee231bb9b6 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp @@ -131,9 +131,7 @@ constexpr bool test() { }); }); - // TODO: Remove the `_LIBCPP_ENABLE_EXPERIMENTAL` check once we have the FTM guarded or views::join isn't - // experimental anymore -#if TEST_STD_VER >= 20 && (!defined(_LIBCPP_VERSION) || defined(_LIBCPP_ENABLE_EXPERIMENTAL)) +#if TEST_STD_VER >= 20 { std::vector> vec = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto view = vec | std::views::join; diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each.pass.cpp index 94a1ec6a1d294..3db0bde75abd7 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each.pass.cpp @@ -56,9 +56,7 @@ struct Test { TEST_CONSTEXPR_CXX20 bool test() { types::for_each(types::cpp17_input_iterator_list(), Test()); - // TODO: Remove the `_LIBCPP_ENABLE_EXPERIMENTAL` check once we have the FTM guarded or views::join isn't - // experimental anymore -#if TEST_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) +#if TEST_STD_VER >= 20 { // Make sure that the segmented iterator optimization works during constant evaluation std::vector> vecs = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto v = std::views::join(vecs);