Range-v3
Range algorithms, views, and actions for the Standard Library
count.hpp File Reference

Functions

template<typename I , typename S , typename V , typename P = identity>
requires input_iterator<I> && sentinel_for<S, I> && indirect_relation<equal_to, projected<I, P>, V const *>
constexpr iter_difference_t< I > ranges::count (I first, S last, V const &val, P proj=P{})
 function template count
 
template<typename Rng , typename V , typename P = identity>
requires input_range<Rng> && indirect_relation<equal_to, projected<iterator_t<Rng>, P>, V const *>
constexpr iter_difference_t< iterator_t< Rng > > ranges::count (Rng &&rng, V const &val, P proj=P{})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.