2 Copyright 2010 Neil Groves
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 template<class SinglePassRange, class Value>
12 typename range_difference<SinglePassRange>::type
13 count(SinglePassRange& rng, const Value& val);
15 template<class SinglePassRange, class Value>
16 typename range_difference<const SinglePassRange>::type
17 count(const SinglePassRange& rng, const Value& val);
22 `count` returns the number of elements `x` in `rng` where `x == val` is `true`.
26 Defined in the header file `boost/range/algorithm/count.hpp`
28 [heading Requirements]
30 * `SinglePassRange` is a model of the __single_pass_range__ Concept.
31 * `Value` is a model of the `EqualityComparableConcept`.
32 * `SinglePassRange`'s value type is a model of the `EqualityComparableConcept`.
33 * An object of `SinglePassRange`'s value type can be compared for equality with an object of type `Value`.
37 Linear. Exactly `distance(rng)` comparisons.