Use std::any_of.