Namespaces
Variants
Views
Actions

operator+(std::reverse_iterator)

From cppreference.com
 
 
Iterator library
Iterator concepts
Iterator primitives
Iterator adaptors
Stream iterators
Iterator customization points
Iterator operations
(C++11)
(C++11)
Range access
(C++11)(C++14)
(C++11)(C++14)
(C++17)(C++20)
(C++14)(C++14)
(C++14)(C++14)
(C++17)
(C++17)
 
 
template< class Iter >

reverse_iterator<Iter>
    operator+( typename reverse_iterator<Iter>::difference_type n,

               const reverse_iterator<Iter>& it );
(until C++17)
template< class Iter >

constexpr reverse_iterator<Iter>
    operator+( typename reverse_iterator<Iter>::difference_type n,

               const reverse_iterator<Iter>& it );
(since C++17)

Returns the iterator it incremented by n.

Contents

[edit] Parameters

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

[edit] Return value

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

[edit] Example

[edit] See also

advances or decrements the iterator
(public member function) [edit]