absl::c_count_if

Container-based version of the <algorithm> std::count_if() function to count values matching a condition within a container.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename Pred>
constexpr
/* implementation-defined */
c_count_if(
    C const& c,
    Pred&& pred);

Return Value

The number of elements in c satisfying pred.

Parameters

NameDescription
cThe container to search.
predThe predicate applied to each element.