[libcxx-commits] [libcxx] [libc++][test] Unblock cases for `ranges::sort` with proxy ranges (PR #188490)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 25 07:00:03 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: A. Jiang (frederick-vs-ja)

<details>
<summary>Changes</summary>

libc++ switched to use `iter_move`/`iter_swap` long time ago, so we should unblock these cases.

---
Full diff: https://github.com/llvm/llvm-project/pull/188490.diff


1 Files Affected:

- (modified) libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp (-3) 


``````````diff
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp
index f9759bd887775..68a1071bb993d 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp
@@ -188,8 +188,6 @@ constexpr bool test() {
     [[maybe_unused]] std::same_as<std::ranges::dangling> decltype(auto) result = std::ranges::sort(std::array{1, 2, 3});
   }
 
-  // TODO: Enable the tests once the implementation switched to use iter_move/iter_swap
-  /*
   { // ProxyIterator
     {
       std::array in = {2, 1, 3};
@@ -206,7 +204,6 @@ constexpr bool test() {
       assert((in == std::array{1, 2, 3}));
     }
   }
-  */
 
   return true;
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/188490


More information about the libcxx-commits mailing list