Skip to content

futures::count_functor

Algorithms / Functions / count_functor

Defined in header <futures/algorithm/count.hpp>

class count_functor;

Functor representing the overloads for the count function.

Inherits from value_cmp_algorithm_functor< Derived >

Public Functions

Member Functions Description
operator() const Execute the underlying algorithm.
(function template)

Public Functions

function operator()

Defined in header <futures/algorithm/traits/value_cmp_algorithm.hpp>

(1)
template <
    executor E, 
    std::input_iterator I, 
    std::sentinel_for< I > S, 
    partitioner_for< I, S > P, 
    class T>
requires std:: indirect_binary_predicate<std::ranges::equal_to, I, T const *>
constexpr
/* see return type below */
operator()(E const & ex, P p, I first, S last, T const & value) const;
(2)
template <
    execution_policy E, 
    std::input_iterator I, 
    std::sentinel_for< I > S, 
    partitioner_for< I, S > P, 
    class T>
requires std:: indirect_binary_predicate<std::ranges::equal_to, I, T const *>
constexpr
/* see return type below */
operator()(E const &, P p, I first, S last, T const & value) const;
(3)
template <
    executor E, 
    std::ranges::range R, 
    partitioner_for< std::ranges::iterator_t< R > > P, 
    class T>
requires std::indirect_binary_predicate< std::ranges::equal_to, std::ranges::iterator_t<R>, T const *>
constexpr
/* see return type below */
operator()(E const & ex, P p, R && r, T const & value) const;
(4)
template <
    executor E, 
    std::ranges::range R, 
    partitioner_for< std::ranges::iterator_t< R > > P, 
    class T>
requires std::indirect_binary_predicate< std::ranges::equal_to, std::ranges::iterator_t<R>, T const *>
constexpr
/* see return type below */
operator()(E const & ex, P p, R && r, T const & value) const;
(5)
template <
    std::input_iterator I, 
    std::sentinel_for< I > S, 
    partitioner_for< I, S > P, 
    class T>
requires std:: indirect_binary_predicate<std::ranges::equal_to, I, T const *>
constexpr
/* see return type below */
operator()(P p, I first, S last, T const & value) const;
(6)
template <
    std::ranges::range R, 
    partitioner_for< std::ranges::iterator_t< R > > P, 
    class T>
requires std::indirect_binary_predicate< std::ranges::equal_to, std::ranges::iterator_t<R>, T const *>
constexpr
/* see return type below */
operator()(P p, R && r, T const & value) const;
(7)
template <
    executor E, 
    std::input_iterator I, 
    std::sentinel_for< I > S, 
    class T>
requires std:: indirect_binary_predicate<std::ranges::equal_to, I, T const *>
constexpr
/* see return type below */
operator()(E const & ex, I first, S last, T const & value) const;
(8)
template <
    executor E, 
    std::input_iterator I, 
    std::sentinel_for< I > S, 
    class T>
requires std:: indirect_binary_predicate<std::ranges::equal_to, I, T const *>
constexpr
/* see return type below */
operator()(E const & ex, I first, S last, T const & value) const;
(9)
template <executor E, std::ranges::range R, class T>
requires std::indirect_binary_predicate< std::ranges::equal_to, std::ranges::iterator_t<R>, T const *>
constexpr
/* see return type below */
operator()(E const & ex, R && r, T const & value) const;
(10)
template <executor E, std::ranges::range R, class T>
requires std::indirect_binary_predicate< std::ranges::equal_to, std::ranges::iterator_t<R>, T const *>
constexpr
/* see return type below */
operator()(E const & ex, R && r, T const & value) const;
(11)
template <std::input_iterator I, std::sentinel_for< I > S, class T>
requires std:: indirect_binary_predicate<std::ranges::equal_to, I, T const *>
constexpr
/* see return type below */
operator()(I first, S last, T const & value) const;
(12)
template <std::ranges::range R, class T>
requires std::indirect_binary_predicate< std::ranges::equal_to, std::ranges::iterator_t<R>, T const *>
constexpr
/* see return type below */
operator()(R && r, T const & value) const;
  1. Execute the underlying algorithm.
  2. Execute the algorithm with an execution policy.
  3. Execute the underlying algorithm on a range of iterators.
  4. Execute the algorithm on a range of iterators and execution policy.
  5. Execute the underlying algorithm with the default executor.
  6. Execute the algorithm on a range with the default executor.
  7. Execute the algorithm with the default partitioner.
  8. Execute the algorithm with execution policy and default partitioner.
  9. Execute algorithm on a range with the default partitioner.
  10. Execute algorithm on a range with policy and default partitioner.
  11. Execute algorithm with default partitioner and executor.
  12. Execute algorithm on a range with default partitioner and executor.

Template Parameters

  • E - Executor type
  • I - Iterator type
  • P - Partitioner type
  • S - Sentinel type
  • T - Value to compare with the iterator value

Parameters

  • ex - An executor instance
  • first - Iterator to first element in the range
  • last - Sentinel iterator to one element past the last
  • p - A partitioner instance
  • value - value to compare the elements to

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