It seems that in practice std::sentinel_for<I, I> is always true, and so the test_range container doesn't help us detect bugs in ranges code in which we wrongly assume that a sentinel can be manipulated like an iterator. Make the test_range range more strict by having end() unconditionally return a sentinel<I>, and adjust some tests accordingly. libstdc++-v3/ChangeLog: * testsuite/24_iterators/range_operations/distance.cc: Do not assume test_range::end() returns the same type as test_range::begin(). * testsuite/24_iterators/range_operations/next.cc: Likewise. * testsuite/24_iterators/range_operations/prev.cc: Likewise. * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end): Always return a sentinel<I>.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| associated_types | Loading commit data... | |
| back_insert_iterator | Loading commit data... | |
| bidirectional | Loading commit data... | |
| common_iterator | Loading commit data... | |
| contiguous | Loading commit data... | |
| counted_iterator | Loading commit data... | |
| customization_points | Loading commit data... | |
| forward | Loading commit data... | |
| front_insert_iterator | Loading commit data... | |
| headers/iterator | Loading commit data... | |
| indirect_callable | Loading commit data... | |
| input | Loading commit data... | |
| insert_iterator | Loading commit data... | |
| istream_iterator | Loading commit data... | |
| istreambuf_iterator | Loading commit data... | |
| move_iterator | Loading commit data... | |
| normal_iterator | Loading commit data... | |
| operations | Loading commit data... | |
| ostream_iterator | Loading commit data... | |
| ostreambuf_iterator | Loading commit data... | |
| output | Loading commit data... | |
| random_access | Loading commit data... | |
| range_access | Loading commit data... | |
| range_operations | Loading commit data... | |
| reverse_iterator | Loading commit data... | |
| container_access.cc | Loading commit data... |