5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_FIND_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_FIND_HPP_
15#include "arene/base/stdlib_choice/enable_if.hpp"
16#include "arene/base/stdlib_choice/is_copy_constructible.hpp"
17#include "arene/base/stdlib_choice/iterator_traits.hpp"
40 base::is_equality_comparable_v<typename std::iterator_traits<Iterator>::reference, Value
const&>>> =
45 Value
const& value_to_find
53 for (Iterator& pos{first}; pos != last; arene::base::advance(pos, 1)) {
54 if (*pos == value_to_find) {
Provides a backport of C++17's constexpr std::advance.
static constexpr value_type value
Definition integral_constant.hpp:34
Definition accumulate.hpp:37
constexpr bool denotes_nothrow_iterable_range_v
Check if an iterator/sentinel pair form an iterable range that can be iterated without throwing.
constexpr auto find(Iterator first, Iterator last, Value const &value_to_find) noexcept(denotes_nothrow_iterable_range_v< Iterator, Iterator > &&noexcept(*first==value_to_find) &&std::is_nothrow_copy_constructible< Iterator >::value) -> Iterator
Constexpr-compatible implementation of std::find.
Definition find.hpp:42
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41