Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Requirements

Header: <algorithm>

Namespace: std

Show:
© 2016 Microsoft