22 template<
class Executor>
class Graph {
30 auto middle = p(first, last);
43 .then(std::logical_or{});
55 template<
class I,
class S,
class Fun>
58 traits::is_input_iterator_v<I> &&
59 traits::is_sentinel_for_v<S, I> &&
60 traits::is_indirectly_unary_invocable_v<Fun, I> &&
61 std::is_copy_constructible_v<Fun>
63 )
static constexpr bool run(
I first,
S last,
Fun f) {
64 return std::any_of(first, last, std::move(f));
79 template<
class E,
class P,
class I,
class S,
class Fun>
82 traits::is_executor_v<E> &&
83 traits::is_partitioner_v<P, I, S> &&
84 traits::is_input_iterator_v<I> &&
85 traits::is_sentinel_for_v<S, I> &&
86 traits::is_indirectly_unary_invocable_v<Fun, I> &&
87 std::is_copy_constructible_v<Fun>
90 if constexpr(traits::is_inline_executor_v<E>) {
91 co_return run(first, last, std::move(f));
93 co_return co_await Graph<E>(executor).launch(p, first, last, std::move(f));
A partitioner is a light callable object that takes a pair of iterators and returns the middle of the...
Identify traits for algorithms, like we do for other types The traits help us generate auxiliary algo...
Graph(const Executor &executor)
Definition AnyOf.hpp:27
Async< bool > launch(P p, I first, S last, Fun f)
Definition AnyOf.hpp:29
const Executor & mExecutor
Definition AnyOf.hpp:24
Functor representing the overloads for the any_of function.
Definition AnyOf.hpp:18
static Async< bool > run(const E &executor, P p, I first, S last, Fun f)
Complete overload of the any_of algorithm.
Definition AnyOf.hpp:89
static constexpr bool run(I first, S last, Fun f)
Complete overload of the any_of algorithm.
Definition AnyOf.hpp:63
Overloads for unary invoke algorithms.
Definition UnaryAlgorithm.hpp:34
Definition Application.hpp:19
constexpr AnyOfAlgorithmFunctor any_of
Checks if a predicate is true for any of the elements in a range.
Definition AnyOf.hpp:99
auto with(Executor executor)
Definition ExecutionContext.hpp:546
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25