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

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 20 03:03:34 PDT 2026


Author: A. Jiang
Date: 2026-04-20T18:03:30+08:00
New Revision: 318a1ea9275eb69ae2ec2bcbdeb22a885dee86ca

URL: https://github.com/llvm/llvm-project/commit/318a1ea9275eb69ae2ec2bcbdeb22a885dee86ca
DIFF: https://github.com/llvm/llvm-project/commit/318a1ea9275eb69ae2ec2bcbdeb22a885dee86ca.diff

LOG: [libc++][test] Unblock cases for `ranges::sort` with proxy ranges (#188490)

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

Added: 
    

Modified: 
    libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp

Removed: 
    


################################################################################
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;
 }


        


More information about the libcxx-commits mailing list