template <class I1, class I2>
requires Common<I1, I2>
constexpr difference_type_t<I2> operator-(
const counted_iterator<I1>& x, const counted_iterator<I2>& y);
Requires: x and y shall refer to elements of the same sequence ([iterators.counted]).
Effects: Equivalent to: return y.cnt - x.cnt;
template <class I>
constexpr difference_type_t<I> operator-(
const counted_iterator<I>& x, default_sentinel y);
Effects: Equivalent to: return -x.cnt;
template <class I>
constexpr difference_type_t<I> operator-(
default_sentinel x, const counted_iterator<I>& y);
Effects: Equivalent to: return y.cnt;
template <RandomAccessIterator I>
constexpr counted_iterator<I> operator+(
difference_type_t<I> n, const counted_iterator<I>& x);
Requires: n <= x.cnt.
Effects: Equivalent to: return x + n;
friend constexpr rvalue_reference_t<I> iter_move(const counted_iterator& i)
noexcept(see below)
requires InputIterator<I>;
Effects: Equivalent to: return ranges::iter_move(i.current);
Remarks: The expression in noexcept is equivalent to:
noexcept(ranges::iter_move(i.current))
template <IndirectlySwappable<I> I2>
friend constexpr void iter_swap(const counted_iterator& x, const counted_iterator<I2>& y)
noexcept(see below);
Effects: Equivalent to ranges::iter_swap(x.current, y.current).
Remarks: The expression in noexcept is equivalent to:
noexcept(ranges::iter_swap(x.current, y.current))
template <Iterator I>
constexpr counted_iterator<I> make_counted_iterator(I i, difference_type_t<I> n);
Requires: n >= 0.
Returns: counted_iterator<I>(i, n).