Container‐based version of the <algorithm> std::partition_copy() function to partition a container's elements and return them into two iterators: one for which pred returns true, and one for which pred returns false.
Synopsis
Declared in <absl/algorithm/container.h>
template<
typename C,
typename OutputIterator1,
typename OutputIterator2,
typename Pred>
constexpr
std::pair<OutputIterator1, OutputIterator2>
c_partition_copy(
C const& c,
OutputIterator1 out_true,
OutputIterator2 out_false,
Pred&& pred);
Return Value
A pair of iterators to the ends of the out_true and out_false ranges.
Parameters
Name |
Description |
c |
The container whose elements to copy. |
out_true |
The output iterator receiving elements satisfying |
out_false |
The output iterator receiving elements not satisfying |
pred |
The predicate used to partition the elements. |
Created with MrDocs