![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
A backport of the constexpr std::reverse_iterator from C++17.
More...

Public Member Functions | |
| constexpr | reverse_iterator ()=default |
| Default construct. | |
| constexpr | reverse_iterator (Itr iter) noexcept(std::is_nothrow_copy_constructible< Itr >::value) |
| Construct from a non-reversed iterator. | |
| constexpr | reverse_iterator (reverse_iterator &&other) noexcept=default |
| Move ctor. | |
| constexpr | reverse_iterator (reverse_iterator const &other) noexcept=default |
| Copy ctor. | |
| template<typename U, constraints< std::enable_if_t<!std::is_same< U, Itr >::value >, std::enable_if_t< std::is_convertible< U const &, Itr >::value > > = nullptr> | |
| constexpr | reverse_iterator (reverse_iterator< U > const &iter) noexcept(std::is_nothrow_constructible< Itr, U const & >::value &&noexcept(iter.base())) |
| Conversion-construct from a reversed iterator of compatible type. | |
| constexpr | reverse_iterator (reverse_iterator_detail::std_reverse_iterator< Itr > const &iter) noexcept(std::is_nothrow_constructible< reviter_base, Itr >::value &&noexcept(iter.base())) |
| Conversion-construct from a std::reverse_iterator. | |
| ~reverse_iterator ()=default | |
| default destructor | |
| constexpr | operator reverse_iterator_detail::std_reverse_iterator< Itr > () const noexcept(std::is_nothrow_constructible< reverse_iterator_detail::std_reverse_iterator< Itr >, Itr >::value &&noexcept(std::declval< reverse_iterator >().base())) |
| Conversion operator to a std::reverse_iterator. | |
| constexpr auto | operator++ () noexcept(noexcept(--std::declval< Itr & >())) -> reverse_iterator & |
| Increments the iterator. | |
| constexpr auto | operator++ (int) noexcept(std::is_nothrow_copy_constructible< reverse_iterator >::value &&noexcept(++std::declval< reverse_iterator & >())) -> reverse_iterator |
| Increments the iterator. | |
| constexpr auto | operator+= (difference_type const delta) noexcept(noexcept(std::declval< Itr & >() -=delta)) -> reverse_iterator & |
| Increments the iterator by an offset. | |
| constexpr auto | operator-- () noexcept(noexcept(++std::declval< Itr & >())) -> reverse_iterator & |
| Decremented the iterator. | |
| constexpr auto | operator-- (int) noexcept(std::is_nothrow_copy_constructible< reverse_iterator >::value &&noexcept(--std::declval< reverse_iterator & >())) -> reverse_iterator |
| Decrements the iterator. | |
| constexpr auto | operator-= (difference_type const delta) noexcept(noexcept(std::declval< Itr & >()+=delta)) -> reverse_iterator & |
| Increments the iterator by an offset. | |
| ARENE_NODISCARD constexpr auto | operator-> () const noexcept(noexcept(std::declval< reverse_iterator const & >().itr_for_access().operator->())) -> pointer |
| Dereferences the iterator. | |
| constexpr auto | operator= (reverse_iterator &&other) noexcept -> reverse_iterator &=default |
| Move assignment. | |
| constexpr auto | operator= (reverse_iterator const &other) noexcept -> reverse_iterator &=default |
| Copy assignment. | |
| ARENE_NODISCARD constexpr auto | operator[] (difference_type const delta) const noexcept -> reference |
| Index-and-dereference the iterator. | |
Static Public Member Functions | |
| template<typename U, constraints< std::enable_if_t< compare_three_way_supported_v< U, Itr > > > = nullptr> | |
| static ARENE_NODISCARD constexpr auto | three_way_compare (reverse_iterator const &lhs, reverse_iterator< U > const &rhs) noexcept -> strong_ordering |
| Compare two random access iterators for relative ordering. | |
| template<typename U, constraints< std::enable_if_t< compare_three_way_supported_v< U, Itr > > > = nullptr> | |
| static ARENE_NODISCARD constexpr auto | three_way_compare (reverse_iterator const &lhs, reverse_iterator_detail::std_reverse_iterator< U > const &rhs) noexcept -> strong_ordering |
| Compare two random access iterators for relative ordering. | |
Friends | |
| template<typename U, constraints< std::enable_if_t<!compare_three_way_supported_v< Itr, U > >, std::enable_if_t< is_inequality_comparable_v< Itr, U > > > = nullptr> | |
| ARENE_NODISCARD friend constexpr auto | operator!= (reverse_iterator const &lhs, reverse_iterator< U > const &rhs) noexcept -> bool |
| Compare two bidirectional iterators for inequality. | |
| template<typename U, constraints< std::enable_if_t<!compare_three_way_supported_v< Itr, U > >, std::enable_if_t< is_inequality_comparable_v< Itr, U > > > = nullptr> | |
| ARENE_NODISCARD friend constexpr auto | operator!= (reverse_iterator const &lhs, reverse_iterator_detail::std_reverse_iterator< U > const &rhs) noexcept -> bool |
| Compare two bidirectional iterators for inequality. | |
| ARENE_NODISCARD friend constexpr auto | operator+ (difference_type const delta, reverse_iterator const &iter) noexcept(std::is_nothrow_copy_constructible< Itr >::value &&is_nothrow_subtractable_v< Itr const &, difference_type const >) -> reverse_iterator |
| Add an offset to the iterator. | |
| ARENE_NODISCARD friend constexpr auto | operator+ (reverse_iterator const &iter, difference_type const delta) noexcept(std::is_nothrow_copy_constructible< Itr >::value &&is_nothrow_subtractable_v< Itr const &, difference_type const >) -> reverse_iterator |
| Add an offset to the iterator. | |
| ARENE_NODISCARD friend constexpr auto | operator- (reverse_iterator const &iter, difference_type const delta) noexcept(std::is_nothrow_copy_constructible< Itr >::value &&is_nothrow_addable_v< Itr const &, difference_type const >) -> reverse_iterator |
| Subtract an offset from the iterator. | |
| ARENE_NODISCARD friend constexpr auto | operator- (reverse_iterator const lhs, reverse_iterator const rhs) noexcept(is_nothrow_subtractable_v< Itr const & >) -> difference_type |
| Compute the difference between two iterators. | |
| template<typename U, constraints< std::enable_if_t<!compare_three_way_supported_v< Itr, U > >, std::enable_if_t< is_equality_comparable_v< Itr, U > > > = nullptr> | |
| ARENE_NODISCARD friend constexpr auto | operator== (reverse_iterator const &lhs, reverse_iterator< U > const &rhs) noexcept -> bool |
| Compare two bidirectional iterators for equality. | |
| template<typename U, constraints< std::enable_if_t<!compare_three_way_supported_v< Itr, U > >, std::enable_if_t< is_equality_comparable_v< Itr, U > > > = nullptr> | |
| ARENE_NODISCARD friend constexpr auto | operator== (reverse_iterator const &lhs, reverse_iterator_detail::std_reverse_iterator< U > const &rhs) noexcept(noexcept(std::declval< Itr >()==std::declval< U >()) &&noexcept(rhs.base())) -> bool |
| Compare two bidirectional iterators for equality. | |
A backport of the constexpr std::reverse_iterator from C++17.
| Itr | The type of the wrapped_iterator to wrap. Must satisfy is_bidirectional_iterator_v . |
Specialization for when the iterator is a non-pointer type.
|
constexprdefault |
Default construct.
|
constexprdefaultnoexcept |
Copy ctor.
| other | The iterator being copied |
|
constexprdefaultnoexcept |
Move ctor.
| other | The iterator being moved |
|
default |
default destructor
|
inlineexplicitconstexprnoexcept |
Construct from a non-reversed iterator.
| iter | The iterator to construct the reversed iterator from |
iter in a reversed view.
|
inlineexplicitconstexprnoexcept |
Conversion-construct from a reversed iterator of compatible type.
| U | The type of the iterator to convert from. Must satisfy std::is_convertible<const U&, Itr>. |
| iter | The iterator to construct the reversed iterator from |
iter in a reversed view.
|
inlineconstexprnoexcept |
Conversion-construct from a std::reverse_iterator.
| iter | The iterator to construct the reversed iterator from |
iter in a reversed view.
|
inlineconstexprnoexcept |
Conversion operator to a std::reverse_iterator.
std::reverse_iterator<Itr> as if constructed from base() .
|
inlineconstexprnoexcept |
Increments the iterator.
|
inlineconstexprnoexcept |
Increments the iterator.
|
inlineconstexprnoexcept |
Increments the iterator by an offset.
| delta | The offset to add. |
delta positions.
|
inlineconstexprnoexcept |
Decremented the iterator.
|
inlineconstexprnoexcept |
Decrements the iterator.
|
inlineconstexprnoexcept |
Increments the iterator by an offset.
| delta | The offset to subtract. |
delta positions.
|
inlineconstexprnoexcept |
Dereferences the iterator.
|
constexprdefaultnoexcept |
Move assignment.
| other | The iterator being moved |
|
constexprdefaultnoexcept |
Copy assignment.
| other | The iterator being copied |
|
inlineconstexprnoexcept |
Index-and-dereference the iterator.
| delta | The offest of the element to access |
*this+delta is within the underlying range *this+delta .
|
inlinestaticconstexprnoexcept |
Compare two random access iterators for relative ordering.
| U | The type of the iterator to compare against. Must satisfy compare_three_way_supported_v<U,Itr> |
| lhs | The first iterator. |
| rhs | The second iterator. |
lhs is an iterator to a position before rhs in the sequence. lhs is an iterator to a position equivalent to rhs in the sequence. lhs is an iterator to a position after rhs in the sequence.
|
inlinestaticconstexprnoexcept |
Compare two random access iterators for relative ordering.
| U | The type of the iterator to compare against. Must satisfy compare_three_way_supported_v<U,Itr> |
| lhs | The first iterator. |
| rhs | The second iterator. |
lhs is an iterator to a position before rhs in the sequence. lhs is an iterator to a position equivalent to rhs in the sequence. lhs is an iterator to a position after rhs in the sequence.
|
friend |
Compare two bidirectional iterators for inequality.
| U | The type of the iterator to compare against. Must satisfy is_equality_comparable<Itr,U> |
| lhs | The first iterator. |
| rhs | The second iterator. |
|
friend |
Compare two bidirectional iterators for inequality.
| U | The type of the iterator to compare against. Must satisfy is_equality_comparable<Itr,U> |
| lhs | The first iterator. |
| rhs | The second iterator. |
|
friend |
Add an offset to the iterator.
| iter | The iterator to add the offset to. |
| delta | The offset to add. |
iter by delta positions.
|
friend |
Add an offset to the iterator.
| iter | The iterator to add the offset to. |
| delta | The offset to add. |
iter by delta positions.
|
friend |
Subtract an offset from the iterator.
| iter | The iterator to subtract the offset from. |
| delta | The offset to subtract. |
iter by delta positions.
|
friend |
Compute the difference between two iterators.
| lhs | The left-hand iterator operand. |
| rhs | The right-hand iterator operand. |
|
friend |
Compare two bidirectional iterators for equality.
| U | The type of the iterator to compare against. Must satisfy is_equality_comparable<Itr,U> |
| lhs | The first iterator. |
| rhs | The second iterator. |
|
friend |
Compare two bidirectional iterators for equality.
| U | The type of the iterator to compare against. Must satisfy is_equality_comparable<Itr,U> |
| lhs | The first iterator. |
| rhs | The second iterator. |