Standard C++ Library Class Reference

Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
stable_partition
Algorithm
Summary
Places all of the entities that satisfy the given predicate before all of the entities that do not,
while maintaining the relative order of elements in each group.
Contents
Synopsis
Description
Complexity
Example
Warning
See Also
Synopsis
#include <algorithm>
template <class BidirectionalIterator, class Predicate>
BidirectionalIterator
stable_partition (BidirectionalIterator first,
BidirectionalIterator last,
Predicate pred);
Description
The stable_partition algorithm places all the elements in the range [first, last) that satisfy pred
before all the elements that do not satisfy it. It returns an iterator i that is one past the end of the