5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ITERATOR_PREV_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ITERATOR_PREV_HPP_
16#include "arene/base/stdlib_choice/enable_if.hpp"
17#include "arene/base/stdlib_choice/iterator_traits.hpp"
18#include "arene/base/stdlib_choice/numeric_limits.hpp"
43template <
typename Iterator, constra
ints<std::enable_if_t<is_b
idirectional_iterator_v<Iterator>>> =
nullptr>
47) noexcept(noexcept(::
arene::
base::advance(itr, -steps))) -> Iterator {
49 ::arene::base::advance(itr, -steps);
Provides a backport of C++17's constexpr std::advance.
provides a uniform interface to the properties of an iterator
Definition iterator_traits.hpp:90
Traits class to provide information about the representation of arithmetic types.
Definition numeric_limits.hpp:745
#define ARENE_PRECONDITION(condition)
Check that a precondition holds, and terminate the application if it does not.
Definition contract.hpp:150
Definition accumulate.hpp:37
ARENE_NODISCARD constexpr auto prev(Iterator itr, typename std::iterator_traits< Iterator >::difference_type steps=1) noexcept(noexcept(::arene::base::advance(itr, -steps))) -> Iterator
Produces the Nth predecessor (or successor if steps is negative) of an iterator.
Definition prev.hpp:44
Definition accumulate.hpp:36
#define ARENE_NODISCARD
An alias for [[nodiscard]] , or a no-op if the attribute is not supported.
Definition nodiscard.hpp:26