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>
auto ranges::count (I first, S last, V const &val, P proj=P{}) -> iter_difference_t< I > requires input_iterator< I > &&sentinel_for< S, I > &&indirect_relation< equal_to, projected< I, P >, V const *>
 function template count
 
template<typename Rng , typename V , typename P = identity>
auto ranges::count (Rng &&rng, V const &val, P proj=P{}) -> iter_difference_t< iterator_t< Rng >> requires input_range< Rng > &&indirect_relation< equal_to, projected< iterator_t< Rng >, P >, V const *>