llvm::count_if

Count elements of Range for which P is true.

Synopsis

Declared in <llvm/ADT/STLExtras.h>

template<
    typename R,
    typename UnaryPredicate>
auto
count_if(
    R&& Range,
    UnaryPredicate P);

Return Value

The number of elements for which P is true.

Parameters

NameDescription
RangeRange to search.
PUnary predicate selecting elements to count.