![]() |
Home | Libraries | People | FAQ | More |
boost::container::for_each_while
// In header: <boost/container/hub.hpp> template<typename ValuePtr, typename F> std::pair< HubIteratorType, F > for_each_while(HubIteratorType first, HubIteratorType last, F f);
Effects: Applies f to the elements of [first, last) in order while f returns true. Equivalent to: while(first != last && f(*first)) ++first; return {first, std::move(f)};
Requires: decltype(first) is the iterator or const_iterator of an instantiation of hub and [first, last) is a valid range.
Returns: A pair with the iterator past the last visited element and std::move(f).
Note: Potentially faster than the equivalent loop thanks to internal unrolling and prefetching.