Export (0) Print
Expand All

all_of

Returns true when a condition is present at each element in the given range.

template<class InputIterator, class Predicate>
    bool all_of(
        InputIterator _First, 
        InputIterator _Last, 
        BinaryPredicate _Comp
    );

_First

An input iterator that indicates where to start to check for a condition. The iterator marks where a range of elements starts.

_Last

An input iterator that indicates the end of the range of elements to check for a condition.

_Comp

A condition to test for. This is a user-defined predicate function object that defines the condition to be satisfied by an element being checked. A predicate takes a single argument and returns true or false.

Returns true if the condition is detected at each element in the indicated range, and false if the condition is not detected at least one time.

The template function returns true only if, for each N in the range [0, _Last - _First), the predicate _Comp(*(_First + N)) is true.

Header: <algorithm>

Namespace: std

Show:
© 2014 Microsoft