Container‐based version of the <algorithm> std::any_of() function to test if any element in a container fulfills a condition.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename Pred>
constexpr
bool
c_any_of(
    C const& c,
    Pred&& pred);

Return Value

true if pred returns true for at least one element of c.

Parameters

Name

Description

c

The container to test.

pred

The predicate applied to each element.

Created with MrDocs