Skip to content
Vlad Riscutia edited this page Nov 7, 2016 · 1 revision

Header pipe/algorithm.h, in namespace pipe::algorithm.

template <typename Predicate>
auto all(Predicate pred);

all returns an object which can act as a rs when applying operator| to a lhs generator. When applied, it returns true if the given Predicate returns true for all elements yielded by the input generator.

Example:

bool out = count(1) | take_n(6) | all([](auto& i){ return i > 0; });
// out is true
Clone this wiki locally