Export (0) Print
Expand All

is_partitioned

Returns true if all the elements in the given range that test true for a condition come before any elements that test false.

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

_First

An input iterator that indicates where a range starts to check for a condition.

_Last

An input iterator that indicates the end of a range.

_Comp

The condition to test for. This is provided by a user-defined predicate function object that defines the condition to be satisfied by the element being searched for. A predicate takes a single argument and returns trueor false.

Returns true when all of the elements in the given range that test true for a condition come before any elements that test false, and otherwise returns false.

The template function returns true only if all elements in [_First, _Last) are partitioned by _Comp; that is, all elements X in [_First, _Last) for which _Comp(X) is true occur before all elements Y for which _Comp(Y) is false.

Header: <algorithm>

Namespace: std

Show:
© 2014 Microsoft