Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2020. The current version is 1.90.0.
template<class SinglePassRange, class Value> typename range_difference<SinglePassRange>::type count(SinglePassRange& rng, const Value& val); template<class SinglePassRange, class Value> typename range_difference<const SinglePassRange>::type count(const SinglePassRange& rng, const Value& val);
count returns the number
of elements x in rng where x
== val
is true.
Defined in the header file boost/range/algorithm/count.hpp
SinglePassRange is
a model of the Single
Pass Range Concept.
Value is a model
of the EqualityComparableConcept.
SinglePassRange's
value type is a model of the EqualityComparableConcept.
SinglePassRange's
value type can be compared for equality with an object of type Value.
Linear. Exactly distance(rng) comparisons.