futures::unary_invoke_algorithm_functor
Algorithms / Algorithm Traits / unary_invoke_algorithm_functor
Defined in header <futures/algorithm/traits/unary_invoke_algorithm.hpp>
template <class Derived>
class unary_invoke_algorithm_functor;
Overloads for unary invoke algorithms.
Description
CRTP class with the overloads for algorithm functors that iterate elements in a sequence with an unary function.
This includes algorithms such as for_each and any_of.
Inherited by: unary_invoke_algorithm_functor
is a base class for
all_of_functor, any_of_functor, count_if_functor, find_if_functor, find_if_not_functor, for_each_functor, and none_of_functor
Public Functions
Member Functions | Description |
---|---|
operator() const | Execute the underlying algorithm. (function template) |
Public Functions
function operator()
Defined in header <futures/algorithm/traits/unary_invoke_algorithm.hpp>
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::indirectly_unary_invocable< I > Fun>
constexpr
/* see return type below */
operator()(E const & ex, P p, I first, S last, Fun f) const;
template <
execution_policy E,
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::indirectly_unary_invocable< I > Fun>
constexpr
/* see return type below */
operator()(E const &, P p, I first, S last, Fun f) const;
template <
executor E,
std::ranges::input_range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::indirectly_unary_invocable< std::ranges::iterator_t< R > > Fun>
constexpr
/* see return type below */
operator()(E const & ex, P p, R && r, Fun f) const;
template <
executor E,
std::ranges::input_range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::indirectly_unary_invocable< std::ranges::iterator_t< R > > Fun>
constexpr
/* see return type below */
operator()(E const & ex, P p, R && r, Fun f) const;
template <
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::indirectly_unary_invocable< I > Fun>
constexpr
/* see return type below */
operator()(P p, I first, S last, Fun f) const;
template <
std::ranges::range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::indirectly_unary_invocable< std::ranges::iterator_t< R > > Fun>
constexpr
/* see return type below */
operator()(P p, R && r, Fun f) const;
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
std::indirectly_unary_invocable< I > Fun>
constexpr
/* see return type below */
operator()(E const & ex, I first, S last, Fun f) const;
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
std::indirectly_unary_invocable< I > Fun>
constexpr
/* see return type below */
operator()(E const & ex, I first, S last, Fun f) const;
template <
executor E,
std::ranges::input_range R,
std::indirectly_unary_invocable< std::ranges::iterator_t< R > > Fun>
constexpr
/* see return type below */
operator()(E const & ex, R && r, Fun f) const;
template <
executor E,
std::ranges::input_range R,
std::indirectly_unary_invocable< std::ranges::iterator_t< R > > Fun>
constexpr
/* see return type below */
operator()(E const & ex, R && r, Fun f) const;
template <
std::input_iterator I,
std::sentinel_for< I > S,
std::indirectly_unary_invocable< I > Fun>
constexpr
/* see return type below */
operator()(I first, S last, Fun f) const;
template <
std::ranges::input_range R,
std::indirectly_unary_invocable< std::ranges::iterator_t< R > > Fun>
constexpr
/* see return type below */
operator()(R && r, Fun f) const;
- Execute the underlying algorithm.
- Execute the underlying algorithm with an execution policy.
- Execute the algorithm with a range of iterators.
- Execute the algorithm with a range of iterators and execution policy.
- Execute the underlying algorithm with a default executor.
- Execute the algorithm on a range with a default executor.
- Execute the underlying algorithm with a default partitioner.
- Execute the algorithm with execution policy and default partitioner.
- Execute the algorithm on a range with the default partitioner.
- Execute the algorithm on a range with policy and default partitioner.
- Execute the algorithm with default executor and partitioner.
- Execute algorithm on a range with default executor and partitioner.
Template Parameters
- E - Executor type
- Fun - Function type
- I - Iterator type
- P - Partitioner type
- S - Sentinel type
Parameters
- ex - An executor instance
- f - Function invocable with the return type of the iterator
- first - Iterator to first element in the range
- last - Sentinel iterator to one element past the last
- p - A partitioner instance
Return value
Result of the underlying algorithm
Description
The execution policy is converted into the corresponding executor
Exception Safety
Basic exception guarantee.
Updated on 2023-01-04