[libcxx-commits] [PATCH] D116002: [libc++] [test] Simplify some ranges tests.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 21 17:31:54 PST 2021
Quuxplusone added inline comments.
================
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));
----------------
ldionne wrote:
> I don't understand how this change is related to the bogus `operator==` removal?
It's not (other than mentioning a "SizedForwardView", which is probably why it was on my radar at the same time). It's related to "Simplify some ranges tests," though.
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