5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_FIND_IF_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_FIND_IF_HPP_
14#include "arene/base/stdlib_choice/enable_if.hpp"
15#include "arene/base/stdlib_choice/iterator_traits.hpp"
41 base::is_invocable_r_v<bool, Predicate&, typename std::iterator_traits<Iterator>::reference>>> =
nullptr>
42constexpr auto find_if(Iterator first, Iterator last, Predicate pred)
46 for (Iterator& pos{first}; pos != last; arene::base::advance(pos, 1)) {
Provides a backport of C++17's constexpr std::advance.
Definition accumulate.hpp:37
constexpr auto find_if(Iterator first, Iterator last, Predicate pred) noexcept(denotes_nothrow_iterable_range_v< Iterator > &&base::is_nothrow_invocable_v< Predicate &, typename std::iterator_traits< Iterator >::reference >) -> Iterator
Returns an iterator to the first element in the range [first, last) that satisfies equality criteria:...
Definition find_if.hpp:42
constexpr bool denotes_nothrow_iterable_range_v
Check if an iterator/sentinel pair form an iterable range that can be iterated without throwing.
constexpr bool is_nothrow_invocable_v
Determine if a functor type is no-throw invocable with the specified argument types.
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