[libcxx-commits] [PATCH] D116002: [libc++] [test] Simplify some ranges tests.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 21 06:57:28 PST 2021


ldionne accepted this revision.
ldionne added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp:72
     assert(begin == std::ranges::begin(view));
-  }
-  {
-    SizedForwardView view{buf, buf + 8};
-    std::ranges::common_view<SizedForwardView> const common(view);
-    using CommonIter = std::common_iterator<ForwardIter, sized_sentinel<ForwardIter>>;
-    std::same_as<CommonIter> auto begin = common.begin();
-    assert(begin == std::ranges::begin(view));
+    std::same_as<CommonIter> auto cbegin = std::as_const(common).begin();
+    assert(cbegin == std::ranges::begin(view));
----------------
I don't understand how this change is related to the bogus `operator==` removal?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116002/new/

https://reviews.llvm.org/D116002



More information about the libcxx-commits mailing list