mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-19 23:50:21 +08:00
The three-argument form of ranges::advance is supposed to return the difference between the second argument and the distance the iterator was advanced. When a non-random-access iterator is not advanced (because it already equals the sentinel) we were returning 0 rather than n - 0. libstdc++-v3/ChangeLog: PR libstdc++/100833 * include/bits/ranges_base.h (ranges::advance(iter, n, sentinel)): Fix return value for no-op case. * testsuite/24_iterators/range_operations/advance.cc: Test return values of three-argument overload. |
||
---|---|---|
.. | ||
associated_types | ||
back_insert_iterator | ||
bidirectional | ||
common_iterator | ||
contiguous | ||
counted_iterator | ||
customization_points | ||
forward | ||
front_insert_iterator | ||
headers/iterator | ||
indirect_callable | ||
input | ||
insert_iterator | ||
istream_iterator | ||
istreambuf_iterator | ||
move_iterator | ||
normal_iterator | ||
operations | ||
ostream_iterator | ||
ostreambuf_iterator | ||
output | ||
random_access | ||
range_access | ||
range_operations | ||
reverse_iterator | ||
aliases.cc | ||
container_access.cc |