3#ifndef TETL_ITERATOR_REVERSE_ITERATOR_HPP
4#define TETL_ITERATOR_REVERSE_ITERATOR_HPP
21template <
typename Iter>
52 template <
typename Other>
54 : _current(other.
base())
60 template <
typename Other>
63 _current = other.base();
68 [[nodiscard]]
constexpr auto base() const -> Iter {
return _current; }
140template <
typename Iter>
148template <
typename Iter1,
typename Iter2>
149[[nodiscard]]
constexpr auto
152 return lhs.base() == rhs.base();
157template <
typename Iter1,
typename Iter2>
158[[nodiscard]]
constexpr auto
161 return lhs.base() != rhs.base();
166template <
typename Iter1,
typename Iter2>
170 return lhs.base() < rhs.base();
175template <
typename Iter1,
typename Iter2>
176[[nodiscard]]
constexpr auto
179 return lhs.base() <= rhs.base();
184template <
typename Iter1,
typename Iter2>
188 return lhs.base() > rhs.base();
193template <
typename Iter1,
typename Iter2>
194[[nodiscard]]
constexpr auto
197 return lhs.base() >= rhs.base();
201template <
typename Iter>
202[[nodiscard]]
constexpr auto
210template <
typename Iterator1,
typename Iterator2>
212 noexcept(
noexcept(rhs.base() - lhs.base())) ->
decltype(rhs.base() - lhs.base())
214 return rhs.base() - lhs.base();
Definition adjacent_find.hpp:8
constexpr auto operator==(inplace_function< R(Args...), Capacity, Alignment > const &f, nullptr_t) noexcept -> bool
Compares a etl::inplace_function with a null pointer. Empty functions (that is, functions without a c...
Definition inplace_function.hpp:262
constexpr auto addressof(T &arg) noexcept -> T *
Obtains the actual address of the object or function arg, even in presence of overloaded operator&.
Definition addressof.hpp:15
constexpr auto operator!=(inplace_function< R(Args...), Capacity, Alignment > const &f, nullptr_t) noexcept -> bool
Compares a etl::inplace_function with a null pointer. Empty functions (that is, functions without a c...
Definition inplace_function.hpp:272
constexpr auto operator-(complex< T > const &val) -> complex< T >
Definition complex.hpp:262
constexpr auto operator<(etl::reverse_iterator< Iter1 > const &lhs, etl::reverse_iterator< Iter2 > const &rhs) -> bool
Compares the underlying iterators. Inverse comparisons are applied in order to take into account that...
Definition reverse_iterator.hpp:167
constexpr auto operator+(complex< T > const &val) -> complex< T >
Definition complex.hpp:256
constexpr auto operator<=(etl::reverse_iterator< Iter1 > const &lhs, etl::reverse_iterator< Iter2 > const &rhs) -> bool
Compares the underlying iterators. Inverse comparisons are applied in order to take into account that...
Definition reverse_iterator.hpp:177
constexpr auto operator>(etl::reverse_iterator< Iter1 > const &lhs, etl::reverse_iterator< Iter2 > const &rhs) -> bool
Compares the underlying iterators. Inverse comparisons are applied in order to take into account that...
Definition reverse_iterator.hpp:185
constexpr auto operator>=(etl::reverse_iterator< Iter1 > const &lhs, etl::reverse_iterator< Iter2 > const &rhs) -> bool
Compares the underlying iterators. Inverse comparisons are applied in order to take into account that...
Definition reverse_iterator.hpp:195
constexpr auto make_reverse_iterator(Iter i) noexcept -> etl::reverse_iterator< Iter >
Convenience function template that constructs a etl::reverse_iterator for the given iterator i (which...
Definition reverse_iterator.hpp:141
iterator_traits is the type trait class that provides uniform interface to the properties of LegacyIt...
Definition iterator_traits.hpp:47
reverse_iterator is an iterator adaptor that reverses the direction of a given iterator....
Definition reverse_iterator.hpp:22
typename etl::iterator_traits< iterator >::pointer pointer
Definition reverse_iterator.hpp:27
constexpr reverse_iterator(Iter x)
Constructs a new iterator adaptor.
Definition reverse_iterator.hpp:44
constexpr auto operator+(difference_type n) const -> reverse_iterator
Returns an iterator which is advanced by n positions.
Definition reverse_iterator.hpp:111
constexpr auto operator--() -> reverse_iterator &
Pre-decrements by one respectively.
Definition reverse_iterator.hpp:96
constexpr reverse_iterator()
Constructs a new iterator adaptor.
Definition reverse_iterator.hpp:36
typename etl::iterator_traits< iterator >::iterator_category iterator_category
Definition reverse_iterator.hpp:28
constexpr auto operator+=(difference_type n) -> reverse_iterator &
Advances the iterator by n or -n positions respectively.
Definition reverse_iterator.hpp:114
constexpr auto operator[](difference_type n) const -> reference
Returns a reference to the element at specified relative location.
Definition reverse_iterator.hpp:131
constexpr auto operator++(int) -> reverse_iterator
Pre-increments by one respectively.
Definition reverse_iterator.hpp:88
constexpr reverse_iterator(reverse_iterator< Other > const &other)
Constructs a new iterator adaptor.
Definition reverse_iterator.hpp:53
iterator iterator_type
Definition reverse_iterator.hpp:23
constexpr auto operator++() -> reverse_iterator &
Pre-increments by one respectively.
Definition reverse_iterator.hpp:81
typename iterator_traits< iterator >::value_type value_type
Definition reverse_iterator.hpp:24
typename etl::iterator_traits< iterator >::difference_type difference_type
Definition reverse_iterator.hpp:25
constexpr auto operator->() const -> pointer
Returns a pointer to the element previous to current.
Definition reverse_iterator.hpp:78
constexpr auto operator-(difference_type n) const -> reverse_iterator
Returns an iterator which is advanced by -n positions.
Definition reverse_iterator.hpp:121
constexpr auto base() const -> iterator
Definition reverse_iterator.hpp:68
typename etl::iterator_traits< iterator >::reference reference
Definition reverse_iterator.hpp:26
constexpr auto operator=(reverse_iterator< Other > const &other) -> reverse_iterator &
The underlying iterator is assigned the value of the underlying iterator of other,...
Definition reverse_iterator.hpp:61
constexpr auto operator--(int) -> reverse_iterator
Pre-decrements by one respectively.
Definition reverse_iterator.hpp:103
constexpr auto operator*() const -> reference
Returns a reference to the element previous to current.
Definition reverse_iterator.hpp:71
constexpr auto operator-=(difference_type n) -> reverse_iterator &
Advances the iterator by n or -n positions respectively.
Definition reverse_iterator.hpp:124