reverse_iterator is an iterator adaptor that reverses the direction of a given iterator. In other words, when provided with a bidirectional iterator, reverse_iterator
produces a new iterator that moves from the end to the beginning of the sequence defined by the underlying bidirectional iterator. This is the iterator returned by member functions rbegin()
and rend()
of the standard library containers.
More...
#include <reverse_iterator.hpp>
template<typename Iter>
struct etl::reverse_iterator< Iter >
reverse_iterator is an iterator adaptor that reverses the direction of a given iterator. In other words, when provided with a bidirectional iterator, reverse_iterator
produces a new iterator that moves from the end to the beginning of the sequence defined by the underlying bidirectional iterator. This is the iterator returned by member functions rbegin()
and rend()
of the standard library containers.
https://en.cppreference.com/w/cpp/iterator/reverse_iterator
◆ difference_type
◆ iterator_category
◆ iterator_type
◆ pointer
◆ reference
◆ value_type
◆ reverse_iterator() [1/3]
Constructs a new iterator adaptor.
Default constructor. The underlying iterator is value-initialized. Operations on the resulting iterator have defined behavior if and only if the corresponding operations on a value-initialized Iterator also have defined behavior.
◆ reverse_iterator() [2/3]
Constructs a new iterator adaptor.
The underlying iterator is initialized with x.
◆ reverse_iterator() [3/3]
template<typename Iter>
template<typename Other>
Constructs a new iterator adaptor.
The underlying iterator is initialized with that of other.
◆ base()
template<typename Iter>
auto base |
( |
| ) |
const -> Iter |
|
inlinenodiscardconstexpr |
Returns the underlying base iterator.
◆ operator*()
Returns a reference to the element previous to current.
◆ operator+()
Returns an iterator which is advanced by n positions.
◆ operator++() [1/2]
Pre-increments by one respectively.
◆ operator++() [2/2]
Pre-increments by one respectively.
◆ operator+=()
Advances the iterator by n or -n positions respectively.
◆ operator-()
Returns an iterator which is advanced by -n positions.
◆ operator--() [1/2]
Pre-decrements by one respectively.
◆ operator--() [2/2]
Pre-decrements by one respectively.
◆ operator-=()
Advances the iterator by n or -n positions respectively.
◆ operator->()
template<typename Iter>
auto operator-> |
( |
| ) |
const -> pointer |
|
inlineconstexpr |
Returns a pointer to the element previous to current.
◆ operator=()
template<typename Iter>
template<typename Other>
The underlying iterator is assigned the value of the underlying iterator of other, i.e. other.base().
◆ operator[]()
Returns a reference to the element at specified relative location.
The documentation for this struct was generated from the following files: