[libcxx-commits] [libcxx] [libc++][ranges][enumerate_view] Update sentinel `equal` test (PR #222331)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sat Sep 12 01:02:24 PDT 2026


================
@@ -37,20 +37,31 @@ constexpr void test() {
   std::array array{0, 1, 2, 3, 84};
 
   View mv{Iterator(std::to_address(base(array.begin()))), Sentinel(Iterator(std::to_address(base(array.end()))))};
-  std::ranges::enumerate_view view(std::move(mv));
+  std::ranges::enumerate_view v(std::move(mv));
 
-  auto const it = view.begin();
-  auto const s  = view.end();
+  auto const it   = v.begin();
+  auto const c_it = std::as_const(v).begin();
+  auto const s    = v.end();
----------------
Zingam wrote:

```suggestion
  auto const st    = v.end();
```

Same as above.

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


More information about the libcxx-commits mailing list