#include <nCine/Base/ReverseIterator.h>
template<class Iterator>
ReverseIterator class
A generic reverse iterator.
Public types
- using Pointer = typename IteratorTraits<Iterator>::Pointer
- Pointer type which respects iterator constness.
- using Reference = typename IteratorTraits<Iterator>::Reference
- Reference type which respects iterator constness.
Constructors, destructors, conversion operators
- ReverseIterator(Iterator it) explicit
-
template<typename Iter>ReverseIterator(const ReverseIterator<Iter>& reverseIt)
- Converting constructor between compatible reverse iterators.
Public functions
- auto operator*() const -> Reference
- Deferencing operator.
- auto operator++() -> ReverseIterator&
- Iterates to the next element (reversed prefix)
- auto operator++(int) -> ReverseIterator
- Iterates to the next element (reversed postfix)
- auto operator--() -> ReverseIterator&
- Iterates to the previous element (reversed prefix)
- auto operator--(int) -> ReverseIterator
- Iterates to the previous element (reversed postfix)
- auto operator+=(int n) -> ReverseIterator&
- Compound addition operator (reversed)
- auto operator-=(int n) -> ReverseIterator&
- Compound subtraction operator (reversed)
- auto operator+(int n) const -> ReverseIterator
- Addition operator (reversed)
- auto operator-(int n) const -> ReverseIterator
- Subtraction operator (reversed)
- auto operator[](int n) const -> Reference
- Subscript operator.
- auto base() const -> Iterator
- Returns the base iterator.
Friends
- auto operator-(const ReverseIterator& lhs, const ReverseIterator& rhs) -> int
- Pointer subtraction operator (reversed)
-
template<typename Iter>auto operator-(const ReverseIterator& lhs, const ReverseIterator<Iter>& rhs) -> int
- Pointer subtraction operator for compatible reverse iterators (reversed)
- auto operator==(const ReverseIterator& lhs, const ReverseIterator& rhs) -> bool
- Equality operator.
-
template<typename Iter>auto operator==(const ReverseIterator& lhs, const ReverseIterator<Iter>& rhs) -> bool
- Equality operator for compatible reverse iterators.
- auto operator!=(const ReverseIterator& lhs, const ReverseIterator& rhs) -> bool
- Inequality operator.
-
template<typename Iter>auto operator!=(const ReverseIterator& lhs, const ReverseIterator<Iter>& rhs) -> bool
- Inequality operator for compatible reverse iterators.
- auto operator>(const ReverseIterator& lhs, const ReverseIterator& rhs) -> bool
- Greater than operator (reversed)
-
template<typename Iter>auto operator>(const ReverseIterator& lhs, const ReverseIterator<Iter>& rhs) -> bool
- Greater than operator for compatible reverse iterators (reversed)
- auto operator<(const ReverseIterator& lhs, const ReverseIterator& rhs) -> bool
- Less than operator (reversed)
-
template<typename Iter>auto operator<(const ReverseIterator& lhs, const ReverseIterator<Iter>& rhs) -> bool
- Less than operator for compatible reverse iterators (reversed)
- auto operator>=(const ReverseIterator& lhs, const ReverseIterator& rhs) -> bool
- Greater than or equal to operator (reversed)
-
template<typename Iter>auto operator>=(const ReverseIterator& lhs, const ReverseIterator<Iter>& rhs) -> bool
- Greater than or equal to operator for compatible reverse iterators (reversed)
- auto operator<=(const ReverseIterator& lhs, const ReverseIterator& rhs) -> bool
- Less than or equal to operator (reversed)
-
template<typename Iter>auto operator<=(const ReverseIterator& lhs, const ReverseIterator<Iter>& rhs) -> bool
- Less than or equal to operator for compatible reverse iterators (reversed)