SysTutorials

Linux Manual Pages › Section 3

operatorstdreverse_iterator(3)

operator+(std::reverse_iterator) - operator+(std::reverse_iterator)

Synopsis

template <class Iter>
reverse_iterator<Iter>(until C++ 17)
operator+(typename reverse_iterator<Iter>::difference_type n,
          const reverse_iterator<Iter> &it);
template <class Iter>
constexpr reverse_iterator<Iter>(since C++ 17)
operator+(typename reverse_iterator<Iter>::difference_type n,
          const reverse_iterator<Iter> &it);

Returns the iterator it incremented by n.

Parameters

n - the number of positions to increment the iterator it - the iterator adaptor to increment

Return value

The incremented iterator, that is reverse_iterator<Iter>(it.base() - n)

Example

 This section is incomplete  Reason: no example

See also

operator++
operator++(int)
operator+=      advances or decrements the iterator
operator+       (public member function)
operator--
operator--(int)
operator-=
operator-