Container‐based version of the <algorithm> std::stable_partition() function to rearrange all elements in a container in such a way that all elements for which pred returns true precede all those for which it returns false, preserving the relative ordering between the two groups. The function returns an iterator to the first element of the second group.
Synopsis
Declared in <absl/algorithm/container.h>
template<
typename C,
typename Pred>
/* implementation-defined */
c_stable_partition(
C& c,
Pred&& pred);
Return Value
An iterator to the first element of the second group.
Parameters
Name |
Description |
c |
The container to partition. |
pred |
The predicate used to partition the elements. |
Created with MrDocs