In particular, this removes the need for adding a ad-hoc operator==
to forward_iterator.
Details
- Reviewers
• Quuxplusone - Group Reviewers
Restricted Project - Commits
- rG7893bb740813: [libc++] Refactor the test for join_view's default constructor
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Wow, that old code was crazy complicated for the fact that this is all it's doing. Nice cleanup.
libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp | ||
---|---|---|
30 | Rename to JoinView? (I don't understand whatever distinction you're making between JoinX and JoinedX.) template <class It> constexpr void test_default_constructible() { using View = std::subrange<It, sentinel_wrapper<It>>; using JoinIterator = std::ranges::iterator_t<std::ranges::join_view<View>>; static_assert(std::is_default_constructible_v<JoinIterator>); JoinIterator it; (void)it; } Likewise below. |
Apply review comments.
libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp | ||
---|---|---|
30 | There's no distinction between JoinedView and JoinView, just my own inconsistency. Thanks for spotting. I'm also fine with renaming Iter to It, but I'll keep view instead of std::subrange in order to keep the test as minimal as possible. |
Rename to JoinView? (I don't understand whatever distinction you're making between JoinX and JoinedX.)
Throughout, I'd rename Iter -> It, and in fact I'd get rid of the custom view helper class in favor of std::subrange:
Likewise below.