Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Function template any_of



// In header: <boost/compute/algorithm/any_of.hpp>

template<typename InputIterator, typename UnaryPredicate> 
  bool any_of(InputIterator first, InputIterator last, 
              UnaryPredicate predicate, 
              command_queue & queue = system::default_queue());


Returns true if predicate returns true for any of the elements in the range [first, last).

For example, to test if a vector contains any negative values:

Space complexity: (1)

See Also:

all_of(), none_of()