5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_ANY_OF_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_ANY_OF_HPP_
14#include "arene/base/algorithm/detail/synthesize_range1_overload.hpp"
15#include "arene/base/algorithm/detail/traits.hpp"
20#include "arene/base/stdlib_choice/declval.hpp"
21#include "arene/base/stdlib_choice/enable_if.hpp"
22#include "arene/base/stdlib_choice/initializer_list.hpp"
23#include "arene/base/stdlib_choice/is_convertible.hpp"
24#include "arene/base/stdlib_choice/iterator_traits.hpp"
25#include "arene/base/stdlib_choice/move.hpp"
36namespace any_of_detail {
55 typename UnaryPredicate,
56 typename Projection = identity,
62 constexpr auto operator()(Iterator begin, Iterator end, UnaryPredicate pred, Projection proj = {})
const noexcept(
72 if (pred(proj(element))) {
95 constexpr auto operator()(Iterator begin, Iterator end)
const noexcept(
100 decltype(construct<bool>)>
114 constexpr auto operator()(std::initializer_list<bool>
const values)
const noexcept ->
bool {
115 return (*
this)(values.begin(), values.end());
124 constexpr auto operator()(Args... args)
const noexcept ->
bool {
125 return (*
this)({args...});
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
Definition accumulate.hpp:37
constexpr bool is_predicate_v
backport for the C++20 predicate concept
typename invoke_result< Fn, Args... >::type invoke_result_t
The return type of a functor invoked with the specified arguments.
Definition is_invocable.hpp:271
constexpr auto make_subrange(Iterator iterator, Sentinel sentinel) noexcept(std::is_nothrow_move_constructible< Iterator >::value &&//std::is_nothrow_move_constructible< Sentinel >::value) -> make_subrange_detail::iterator_range< Iterator, Sentinel >
Combine an iterator and sentinel into a range type that can be used with range-based for loops.
Definition make_subrange.hpp:98
constexpr bool is_nothrow_invocable_v
Determine if a functor type is no-throw invocable with the specified argument types.
constexpr bool all_are_same_v
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
bool
Check if element Idx and all subsequent elements of the two tuples are equal.
Definition tuple.hpp:649
constexpr auto move(T &&value) noexcept -> remove_reference_t< T > &&
Cast a value to an rvalue.
Definition move.hpp:30
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
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...