Details
- Reviewers
cjdb • Quuxplusone - Group Reviewers
Restricted Project - Commits
- rG3aaac01aab2f: [libcxx][ranges] Fix tests for stdlib types that conform to sized_sentinel_for.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/std/containers/associative/map/iterator_concept_conformance.compile.pass.cpp | ||
---|---|---|
47–50 | You mean !std::sized_sentinel_for, since these iterators are merely bidirectional. (Sized-sentinel-ness essentially requires random-access iterators, because it requires subtraction to work.) |
LGTM pending CI passing. This was a bit smaller than I'd expected, so please do a quick check to make sure you caught them all before submitting. Thanks for following up on this!
Ship it, since it fixes typos in the tests.
But, like, none of these tests are useful, IMO. It's arguably useful to test in one place (namely in the reverse_iterator tests) that declval<T>() == declval<reverse_iterator<T>>() is SFINAE-friendly ill-formed; but testing it indirectly, via the same 4 copied lines, pasted among 10 different container tests, and only tested in C++20 mode, is not so useful.
You mean !std::sized_sentinel_for, since these iterators are merely bidirectional. (Sized-sentinel-ness essentially requires random-access iterators, because it requires subtraction to work.)