Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::v3::_counted_iterator_::counted_iterator< I, typename > Struct Template Reference

Friends

void advance (counted_iterator &i, difference_type_t< I > n)
 
template<typename , typename >
struct counted_iterator
 
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_, y.current_))(ranges::iter_swap(x.current_, y.current_))))
 

Public Types

using difference_type = difference_type_t< I >
 
using iterator_type = I
 

Public Member Functions

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(decltype(*current_)(*current_)))
 
template<typename I2 = I, requires = (Readable<I2 const>())>
reference_t< I > operator* () const noexcept(noexcept(decltype(*static_cast< I2 const &>(current_))(*static_cast< I2 const &>(current_))))
 
counted_iterator operator+ (difference_type n) const
 
counted_iteratoroperator++ ()
 
auto operator++ (int) -> decltype(current_++)
 
counted_iterator operator++ (int)
 
counted_iteratoroperator+= (difference_type n)
 
counted_iterator operator- (difference_type n) const
 
counted_iteratoroperator-- ()
 
counted_iterator operator-- (int)
 
counted_iteratoroperator-= (difference_type n)
 
template<typename I2 , requires = (ConvertibleTo<I2, I>())>
counted_iteratoroperator= (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_::counted_iterator< I, typename >::operator+ ( difference_type  n) const
Precondition
RandomAccessIterator<I>()

◆ operator++() [1/2]

template<typename I , typename >
auto ranges::v3::_counted_iterator_::counted_iterator< I, typename >::operator++ ( int  ) -> decltype(current_++)
Precondition
!ForwardIterator()

◆ operator++() [2/2]

template<typename I , typename >
counted_iterator ranges::v3::_counted_iterator_::counted_iterator< I, typename >::operator++ ( int  )
Precondition
ForwardIterator<I>()

◆ operator+=()

template<typename I , typename >
counted_iterator& ranges::v3::_counted_iterator_::counted_iterator< I, typename >::operator+= ( difference_type  n)
Precondition
RandomAccessIterator<I>()

◆ operator-()

template<typename I , typename >
counted_iterator ranges::v3::_counted_iterator_::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_::counted_iterator< I, typename >::operator-- ( )
Precondition
BidirectionalIterator<I>()

◆ operator--() [2/2]

template<typename I , typename >
counted_iterator ranges::v3::_counted_iterator_::counted_iterator< I, typename >::operator-- ( int  )
Precondition
BidirectionalIterator<I>()

◆ operator-=()

template<typename I , typename >
counted_iterator& ranges::v3::_counted_iterator_::counted_iterator< I, typename >::operator-= ( difference_type  n)
Precondition
RandomAccessIterator<I>()

◆ operator[]()

template<typename I , typename >
reference_t<I> ranges::v3::_counted_iterator_::counted_iterator< I, typename >::operator[] ( difference_type  n) const
Precondition
RandomAccessIterator<I>()