Container-based version of the <algorithm> std::count_if() function to count values matching a condition within a container.
Declared in <absl/algorithm/container.h>
template<
typename C,
typename Pred>
constexpr
/* implementation-defined */
c_count_if(
C const& c,
Pred&& pred);
The number of elements in c satisfying pred.
| Name | Description |
|---|---|
| c | The container to search. |
| pred | The predicate applied to each element. |