24 Iterators library [iterators]

24.5 Iterator adaptors [predef.iterators]

24.5.7 Counted iterators [iterators.counted]

24.5.7.6 Comparisons [counted.iter.cmp]

template<common_with<I> I2> friend constexpr bool operator=( const counted_iterator& x, const counted_iterator<I2>& y);
Preconditions: x and y refer to elements of the same sequence ([counted.iterator]).
Effects: Equivalent to: return x.length == y.length;
friend constexpr bool operator=( const counted_iterator& x, default_sentinel_t) noexcept;
Effects: Equivalent to: return x.length == 0;
template<common_with<I> I2> friend constexpr strong_ordering operator<=>( const counted_iterator& x, const counted_iterator<I2>& y);
Preconditions: x and y refer to elements of the same sequence ([counted.iterator]).
[Note 1: 
The argument order in the Effects: element is reversed because length counts down, not up.
— end note]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant