absl::c_any_of

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

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