Details
- Reviewers
ldionne EricWF zoecarver Mordante curdeius • Quuxplusone - Group Reviewers
Restricted Project - Commits
- rG38225d692163: [libcxx][iterator] adds `std::input_or_output_iterator` and `std::sentinel_for`
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp | ||
---|---|---|
44–48 | semi_regular also requires copyability (https://eel.is/c++draft/concepts.object). Please add a check that a non copyable iterator is not a sentinel for itself (aka move-only input iterators) |
LGMT.
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.iterator/input_or_output_iterator.compile.pass.cpp | ||
---|---|---|
185 | I'm not going to keep commenting on this if I see it again. | |
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp | ||
44–48 | +1 |
In general LGTM modulo some nits and the request of @miscco. But I like to know more about the locale_dependent test before approving.
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp | ||
---|---|---|
14 | Please update this part to template<class S, class I> | |
103 | Here iterator and const_iterator are not tested against the full set, like reverse_iterator and const_reverse_iterator. Can you add them for completeness? | |
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/locale_dependent.compile.pass.cpp | ||
13 | What's locale dependent with this test? | |
22 | Please remove the sized_sentinel since it isn't added here. |
Requesting changes until my and other reviewer's comments have been address, to help keep track of the status of this patch.
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.iterator/input_or_output_iterator.compile.pass.cpp | ||
---|---|---|
65 | Why do we have those here if we also have the various iterator_concept_conformance.compile.pass.cpp tests? |
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.iterator/input_or_output_iterator.compile.pass.cpp | ||
---|---|---|
65 | I mustn't have deleted these before pushing :S | |
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp | ||
103 | PTAL at the individual tests. | |
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/locale_dependent.compile.pass.cpp | ||
13 | File deleted. |
LGTM with @Mordante 's comment fixed and CI passing. Thanks!
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.iterator/input_or_output_iterator.compile.pass.cpp | ||
---|---|---|
54–71 | It's not clear to me that testing *all* of those qualifiers adds that much value over just testing one of them. Non-blocking, but if I had written this myself, I wouldn't have tested all of them since it feels like diminishing returns to me. | |
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp | ||
14 | You seem to have missed this comment. |
LGTM, but please address the two minor issues before landing https://reviews.llvm.org/D100160#inline-951054 and the comment below.
And please wait for the CI to turn green.
libcxx/test/std/iterators/iterator.requirements/iterator.concepts/locale_dependent.compile.pass.cpp | ||
---|---|---|
22 | I still see this comment. |
Why do we have those here if we also have the various iterator_concept_conformance.compile.pass.cpp tests?