llvm-c166/libcxx/include/__iterator
Lucas Mellone 6b4dfcfc86
[libc++][NFC] Update implementation strategy of the operator()(I&& first, S last) for std::ranges::distance (#215994)
This patch updates the implementation strategy for `ranges::distance(I&&
first, S last)` to match the exact wording from the Standard.

This implementation is NFC because the return type and the branching
condition will be the same after the change, and the tests present in
`libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp`
are already covering the scenarios for such change.

References:
- https://cplusplus.github.io/LWG/issue3664
- https://cplusplus.github.io/LWG/issue4242
- https://wg21.link/range.iter.op.distance

Follows up: https://github.com/llvm/llvm-project/pull/211568
2026-08-13 20:12:27 +08:00
..
access.h
advance.h
aliasing_iterator.h
back_insert_iterator.h
bounded_iter.h
capacity_aware_iterator.h
common_iterator.h
concepts.h
counted_iterator.h
cpp17_iterator_concepts.h
data.h
default_sentinel.h
distance.h [libc++][NFC] Update implementation strategy of the operator()(I&& first, S last) for std::ranges::distance (#215994) 2026-08-13 20:12:27 +08:00
empty.h
erase_if_container.h [libc++] Make <map> std::map constexpr as part of P3372R3 (#134330) 2026-06-03 09:59:57 +02:00
front_insert_iterator.h
incrementable_traits.h
indirectly_comparable.h
insert_iterator.h
istream_iterator.h
istreambuf_iterator.h
iter_move.h
iter_swap.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
iterator.h
iterator_traits.h
iterator_with_data.h
mergeable.h
move_iterator.h
move_sentinel.h
next.h
ostream_iterator.h
ostreambuf_iterator.h
permutable.h
prev.h
product_iterator.h
projected.h
ranges_iterator_traits.h
readable_traits.h
reverse_access.h
reverse_iterator.h
segmented_iterator.h
size.h
sortable.h
static_bounded_iter.h
unreachable_sentinel.h
wrap_iter.h