23 Iterators library [iterators]

23.5 Iterator adaptors [predef.iterators]

23.5.6 Counted iterators [iterators.counted]

23.5.6.2 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 convertible_to<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_from<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.