[libcxx-commits] [PATCH] D111372: [libc++] [test] The long-awaited mass refactor of "test_iterators.h" sentinels [WIP]
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 7 18:21:13 PDT 2021
Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, libc++.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
I did this locally as about ten commits, which might be easier to grok individually; but I'm thinking I should land it as one monolithic commit.
https://github.com/Quuxplusone/llvm-project/compare/main...bogus-operators
The goals include:
- Rename `sentinel_wrapper` to just `sentinel`, so that now we have e.g. `foo_iterator` and e.g. `sentinel`, `sized_sentinel`. (This required doing some other refactors to get rid of a couple of global types named `sentinel`.)
- Where appropriate, use `sized_sentinel<It>`, instead of using `sentinel_wrapper<It>`-plus-some-bogus-ad-hoc-operator-overloads.
- Refactor `sentinel` and `sized_sentinel` to more closely resemble the existing `foo_iterator` archetypes, and to permit creating `sentinel<cpp20_input_iterator<int*>>` — iterators can be move-only, but sentinels must be copyable.
- Opportunistically simplify some Ranges tests (but not systematically; just anything I was already touching for other reasons).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111372
Files:
libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_sentinel.pass.cpp
libcxx/test/std/ranges/range.access/range.prim/empty.pass.cpp
libcxx/test/std/ranges/range.access/range.prim/ssize.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.all/all_t.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.common.view/borrowing.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.common.view/ctad.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.common.view/end.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.common.view/types.h
libcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.drop/types.h
libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.verify.cpp
libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.reverse/borrowing.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.reverse/ctad.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.reverse/types.h
libcxx/test/std/ranges/range.adaptors/range.take/borrowing.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.take/sentinel/base.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.take/sentinel/ctor.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.take/types.h
libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.transform/size.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.transform/types.h
libcxx/test/std/ranges/range.req/range.range/helper_aliases.compile.pass.cpp
libcxx/test/std/ranges/range.req/range.range/iterator_t.compile.pass.cpp
libcxx/test/std/ranges/range.req/range.range/sentinel_t.compile.pass.cpp
libcxx/test/std/ranges/range.req/range.refinements/output_range.compile.pass.cpp
libcxx/test/std/ranges/range.utility/range.subrange/enable_borrowed_range.compile.pass.cpp
libcxx/test/support/test_iterators.h
libcxx/test/support/test_range.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111372.378045.patch
Type: text/x-patch
Size: 60796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211008/8223ec0a/attachment-0001.bin>
More information about the libcxx-commits
mailing list