22 Iterators library [iterators]

22.5 Iterator adaptors [predef.iterators]

22.5.6 Counted iterators [iterators.counted] Constructors and conversions [counted.iter.const]

constexpr counted_iterator(I i, iter_difference_t<I> n);
Expects: n >= 0.
Effects: Initializes current with i and length with n.
template<class I2> requires ConvertibleTo<const I2&, I> constexpr counted_iterator(const counted_iterator<I2>& x);
Effects: Initializes current with x.current and length with x.length.
template<class I2> requires Assignable<I&, const I2&> constexpr counted_iterator& operator=(const counted_iterator<I2>& x);
Effects: Assigns x.current to current and x.length to length.
Returns: *this.