diff --git a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp --- a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp +++ b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp @@ -66,7 +66,7 @@ T *mid = a+5; T *last = a+10; T *first2 = b; - //T *mid2 = b+5; + T *mid2 = b+5; T *last2 = b+10; void *value = nullptr; int count = 1; @@ -78,8 +78,8 @@ (void)std::ranges::all_of(a, UnaryTrue(), Proj(&copies)); assert(copies == 0); (void)std::ranges::any_of(first, last, UnaryTrue(), Proj(&copies)); assert(copies == 0); (void)std::ranges::any_of(a, UnaryTrue(), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::binary_search(first, last, value, Less(), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::binary_search(a, value, Less(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::binary_search(first, last, value, Less(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::binary_search(a, value, Less(), Proj(&copies)); assert(copies == 0); //(void)std::ranges::clamp(T(), T(), T(), Less(), Proj(&copies)); assert(copies == 0); (void)std::ranges::count(first, last, value, Proj(&copies)); assert(copies == 0); (void)std::ranges::count(a, value, Proj(&copies)); assert(copies == 0); @@ -96,8 +96,8 @@ //(void)std::ranges::equal_range(a, value, Less(), Proj(&copies)); assert(copies == 0); (void)std::ranges::find(first, last, value, Proj(&copies)); assert(copies == 0); (void)std::ranges::find(a, value, Proj(&copies)); assert(copies == 0); - //(void)std::ranges::find_end(first, last, first2, mid2, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::find_end(a, b, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); + (void)std::ranges::find_end(first, last, first2, mid2, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); + (void)std::ranges::find_end(a, b, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); (void)std::ranges::find_first_of(first, last, first2, last2, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); (void)std::ranges::find_first_of(a, b, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); (void)std::ranges::find_if(first, last, UnaryTrue(), Proj(&copies)); assert(copies == 0); @@ -125,8 +125,8 @@ //if (!std::is_constant_evaluated()) { (void)std::ranges::inplace_merge(a, mid, Less(), Proj(&copies)); assert(copies == 0); } (void)std::ranges::lexicographical_compare(first, last, first2, last2, Less(), Proj(&copies), Proj(&copies)); assert(copies == 0); (void)std::ranges::lexicographical_compare(a, b, Less(), Proj(&copies), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::lower_bound(first, last, value, Less(), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::lower_bound(a, value, Less(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::lower_bound(first, last, value, Less(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::lower_bound(a, value, Less(), Proj(&copies)); assert(copies == 0); (void)std::ranges::make_heap(first, last, Less(), Proj(&copies)); assert(copies == 0); (void)std::ranges::make_heap(a, Less(), Proj(&copies)); assert(copies == 0); (void)std::ranges::max(T(), T(), Less(), Proj(&copies)); assert(copies == 0); @@ -186,10 +186,10 @@ (void)std::ranges::replace(a, value, T(), Proj(&copies)); assert(copies == 0); (void)std::ranges::replace_if(first, last, UnaryTrue(), T(), Proj(&copies)); assert(copies == 0); (void)std::ranges::replace_if(a, UnaryTrue(), T(), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::search(first, last, first2, mid2, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::search(a, b, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::search_n(first, last, count, value, Equal(), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::search_n(a, count, value, Equal(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::search(first, last, first2, mid2, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); + (void)std::ranges::search(a, b, Equal(), Proj(&copies), Proj(&copies)); assert(copies == 0); + (void)std::ranges::search_n(first, last, count, value, Equal(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::search_n(a, count, value, Equal(), Proj(&copies)); assert(copies == 0); (void)std::ranges::set_difference(first, mid, mid, last, first2, Less(), Proj(&copies), Proj(&copies)); assert(copies == 0); (void)std::ranges::set_difference(a, b, first2, Less(), Proj(&copies), Proj(&copies)); assert(copies == 0); (void)std::ranges::set_intersection(first, mid, mid, last, first2, Less(), Proj(&copies), Proj(&copies)); assert(copies == 0); @@ -217,8 +217,8 @@ //(void)std::ranges::unique(a, Equal(), Proj(&copies)); assert(copies == 0); //(void)std::ranges::unique_copy(first, last, first2, Equal(), Proj(&copies)); assert(copies == 0); //(void)std::ranges::unique_copy(a, first2, Equal(), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::upper_bound(first, last, value, Less(), Proj(&copies)); assert(copies == 0); - //(void)std::ranges::upper_bound(a, value, Less(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::upper_bound(first, last, value, Less(), Proj(&copies)); assert(copies == 0); + (void)std::ranges::upper_bound(a, value, Less(), Proj(&copies)); assert(copies == 0); return true; } diff --git a/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.compile.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.compile.pass.cpp --- a/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.compile.pass.cpp +++ b/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.compile.pass.cpp @@ -87,7 +87,7 @@ //auto out2 = output.begin() + 1; int x = 2; - //int count = 1; + int count = 1; in_pred(std::ranges::any_of, in, unary_pred); in_pred(std::ranges::all_of, in, unary_pred); @@ -123,9 +123,9 @@ in_pred(std::ranges::minmax_element, in, binary_pred); in_pred(std::ranges::count_if, in, unary_pred); //in2_pred(std::ranges::search, in, in2, binary_pred); - //std::ranges::search_n(in.begin(), in.end(), count, x, binary_pred); - //std::ranges::search_n(in, count, x, binary_pred); - //in2_pred(std::ranges::find_end, in, in2, binary_pred); + std::ranges::search_n(in.begin(), in.end(), count, x, binary_pred); + std::ranges::search_n(in, count, x, binary_pred); + in2_pred(std::ranges::find_end, in, in2, binary_pred); in_pred(std::ranges::is_partitioned, in, unary_pred); in_pred(std::ranges::is_sorted, in, binary_pred); in_pred(std::ranges::is_sorted_until, in, binary_pred); diff --git a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.compile.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.compile.pass.cpp --- a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.compile.pass.cpp +++ b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.compile.pass.cpp @@ -136,11 +136,11 @@ in_pred(std::ranges::minmax_element, in, &Foo::binary_pred, &Bar::val); in_val(std::ranges::count, in, x, &Bar::val); in_pred(std::ranges::count_if, in, &Foo::unary_pred, &Bar::val); - //in2_pred(std::ranges::search, in, in2, &Foo::binary_pred, &Bar::val, &Bar::val); + in2_pred(std::ranges::search, in, in2, &Foo::binary_pred, &Bar::val, &Bar::val); // search_n - //std::ranges::search_n(in.begin(), in.end(), count, x, &Foo::binary_pred, &Bar::val); - //std::ranges::search_n(in, count, x, &Foo::binary_pred, &Bar::val); - //in2_pred(std::ranges::find_end, in, in2, &Foo::binary_pred, &Bar::val, &Bar::val); + std::ranges::search_n(in.begin(), in.end(), count, x, &Foo::binary_pred, &Bar::val); + std::ranges::search_n(in, count, x, &Foo::binary_pred, &Bar::val); + in2_pred(std::ranges::find_end, in, in2, &Foo::binary_pred, &Bar::val, &Bar::val); in_pred(std::ranges::is_partitioned, in, &Foo::unary_pred, &Bar::val); in_pred(std::ranges::is_sorted, in, &Foo::binary_pred, &Bar::val); in_pred(std::ranges::is_sorted_until, in, &Foo::binary_pred, &Bar::val);