Luna::ReverseIterator
An iterator adaptor that reverses the direction of a given iterator.
template <typename _Iter>
class Luna::ReverseIterator
The given iterator must be at least an bidirectional iterator.
Member functions
-
Constructs an empty reverse iterator.
-
constexpr ReverseIterator(iterator_type i)
Constructs a reverse iterator for the given iterator.
-
constexpr ReverseIterator(const ReverseIterator &ri)
Constructs a reverse iterator by coping from the specified reverse iterator.
-
constexpr ReverseIterator(const ReverseIterator< _Uty > &ri)
Constructs a reverse iterator by coping from the specified reverse iterator of different iterator type.
-
constexpr iterator_type base() const
Gets the base iterator of this reverse iterator.
-
constexpr reference operator*() const
Gets the object this iterator points to.
-
constexpr pointer operator->() const
Gets one pointer to the object this iterator points to.
-
constexpr ReverseIterator & operator++()
Pre-increments the iterator to the next object, which is the last object the base iterator points to.
-
constexpr ReverseIterator operator++(int)
Post-increments the iterator to the next object, which is the last object the base iterator points to.
-
constexpr ReverseIterator & operator--()
Pre-decrements the iterator to the last object, which is the next object the base iterator points to.
-
constexpr ReverseIterator operator--(int)
Post-decrements the iterator to the last object, which is the next object the base iterator points to.
-
constexpr ReverseIterator operator+(isize n) const
Gets one iterator which is advanced by
n
positions respectively. -
constexpr ReverseIterator & operator+=(isize n)
Advances the iterator by
n
positions respectively. -
constexpr ReverseIterator operator-(isize n) const
Gets one iterator which is advanced by
-n
positions respectively. -
constexpr ReverseIterator & operator-=(isize n)
Advances the iterator by
-n
positions respectively. -
constexpr reference operator[](isize n) const
Returns a reference to the element at specified relative location.