Range-v3 Range algorithms, views, and actions for the Standard Library |

Friends | Public Types | Public Member Functions | List of all members
ranges::v3::counted_iterator< I, typename > Struct Template Reference

## Friends
void | advance (counted_iterator &i, difference_type_t< I > n)
rvalue_reference_t< I > | iter_move (const counted_iterator &i) noexcept(noexcept(decltype(ranges::iter_move(i.current_))(ranges::iter_move(i.current_))))
template<typename I2 , requires = (IndirectlySwappable<I2, I>())>
void | iter_swap (const counted_iterator &x, counted_iterator< I2 > const &y) noexcept(noexcept(decltype(ranges::iter_swap(x.current_, _counted_iterator_::access::current(y)))(ranges::iter_swap(x.current_, _counted_iterator_::access::current(y)))))

## Public Types
using | difference_type = difference_type_t< I >
using | iterator_type = I

## Public Member Functions
I | base () const
difference_type_t< I > | count () const
| counted_iterator (I x, difference_type_t< I > n)
template<typename I2 , requires = (ConvertibleTo<I2, I>())>
| counted_iterator (const counted_iterator< I2 > &i)
reference_t< I > | operator * () noexcept(noexcept(reference_t< I >(*current_)))
template<typename I2 = I, requires = (Readable<I const>())>
reference_t< I2 > | operator * () const noexcept(noexcept(reference_t< I >(*current_)))
counted_iterator | operator+ (difference_type n) const
counted_iterator & | operator++ ()
auto | operator++ (int) -> decltype(current_++)
counted_iterator | operator++ (int)
counted_iterator & | operator+= (difference_type n)
counted_iterator | operator- (difference_type n) const
counted_iterator & | operator-- ()
counted_iterator | operator-- (int)
counted_iterator & | operator-= (difference_type n)
template<typename I2 , requires = (ConvertibleTo<I2, I>())>
counted_iterator & | operator= (const counted_iterator< I2 > &i)
reference_t< I > | operator[] (difference_type n) const

## Methods

## ◆ iter_move

template<typename I, typename >

rvalue_reference_t<I> iter_move | ( | const counted_iterator< I, typename > & | i | ) |
| friend

Precondition
  InputIterator<I>()

## Member Function Documentation

## ◆ operator+()

template<typename I, typename >

counted_iterator ranges::v3::counted_iterator< I, typename >::operator+ | ( | difference_type | n | ) | const

Precondition
  RandomAccessIterator<I>()

## ◆ operator++() [1/2]

template<typename I, typename >

auto ranges::v3::counted_iterator< I, typename >::operator++ | ( | int |  | ) | -> decltype(current_++)

Precondition
  !ForwardIterator()

## ◆ operator++() [2/2]

template<typename I, typename >

counted_iterator ranges::v3::counted_iterator< I, typename >::operator++ | ( | int |  | ) |

Precondition
  ForwardIterator<I>()

## ◆ operator+=()

template<typename I, typename >

counted_iterator& ranges::v3::counted_iterator< I, typename >::operator+= | ( | difference_type | n | ) |

Precondition
  RandomAccessIterator<I>()

## ◆ operator-()

template<typename I, typename >

counted_iterator ranges::v3::counted_iterator< I, typename >::operator- | ( | difference_type | n | ) | const

Precondition
  RandomAccessIterator<I>()

## ◆ operator--() [1/2]

template<typename I, typename >

counted_iterator& ranges::v3::counted_iterator< I, typename >::operator-- | ( |  | ) |

Precondition
  BidirectionalIterator<I>()

## ◆ operator--() [2/2]

template<typename I, typename >

counted_iterator ranges::v3::counted_iterator< I, typename >::operator-- | ( | int |  | ) |

Precondition
  BidirectionalIterator<I>()

## ◆ operator-=()

template<typename I, typename >

counted_iterator& ranges::v3::counted_iterator< I, typename >::operator-= | ( | difference_type | n | ) |

Precondition
  RandomAccessIterator<I>()

## ◆ operator[]()

template<typename I, typename >

reference_t<I> ranges::v3::counted_iterator< I, typename >::operator[] | ( | difference_type | n | ) | const

Precondition
  RandomAccessIterator<I>()