[counted.iter.cmp] (original) (raw)
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](concept.common#concept:common%5Fwith "18.4.6 Concept common_with [concept.common]")<I> I2> friend constexpr bool operator==( const counted_iterator& x, const counted_iterator<I2>& y);
Effects: Equivalent to: return x.length == y.length;
friend constexpr bool operator==( const counted_iterator& x, default_sentinel_t);
Effects: Equivalent to: return x.length == 0;
template<[common_with](concept.common#concept:common%5Fwith "18.4.6 Concept common_with [concept.common]")<I> I2> friend constexpr strong_ordering operator<=>( const counted_iterator& x, const counted_iterator<I2>& y);
Effects: Equivalent to: return y.length <=> x.length;
[Note 1:
The argument order in the Effects: element is reversed because length counts down, not up.
— _end note_]