13#ifndef RANGES_V3_ALGORITHM_COUNT_HPP
14#define RANGES_V3_ALGORITHM_COUNT_HPP
27#include <range/v3/utility/static_const.hpp>
29#include <range/v3/detail/prologue.hpp>
35 RANGES_FUNC_BEGIN(count)
41 constexpr iter_difference_t<I>
42 RANGES_FUNC(count)(I
first, S last, V const & val, P proj = P{})
44 iter_difference_t<I> n = 0;
52 template(
typename Rng,
typename V,
typename P =
identity)(
55 constexpr iter_difference_t<iterator_t<Rng>>
56 RANGES_FUNC(count)(Rng && rng, V
const & val, P proj = P{})
58 return (*
this)(begin(rng), end(rng), val, std::move(proj));
61 RANGES_FUNC_END(count)
70#include <range/v3/detail/epilogue.hpp>
The indirect_relation concept.
The sentinel_for concept.
template(typename Rng, typename V, typename P=identity)(AND indirect_relation< equal_to
This is an overloaded member function, provided for convenience. It differs from the above function o...
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition: meta.hpp:541
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251
Definition: comparisons.hpp:28
Definition: identity.hpp:25