[#absl-c_partition_copy]
= xref:absl.adoc[absl]::c&lowbar;partition&lowbar;copy
:relfileprefix: ../
:mrdocs:

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;partition&lowbar;copy()` function to partition a container&apos;s elements and return them into two iterators&colon; one for which `pred` returns `true`, and one for which `pred` returns `false&period;`

== Synopsis

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename C,
    typename OutputIterator1,
    typename OutputIterator2,
    typename Pred&gt;
constexpr
std::pair&lt;OutputIterator1, OutputIterator2&gt;
c&lowbar;partition&lowbar;copy(
    C const& c,
    OutputIterator1 out&lowbar;true,
    OutputIterator2 out&lowbar;false,
    Pred&& pred);
----

== Return Value

A pair of iterators to the ends of the `out&lowbar;true` and `out&lowbar;false` ranges&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *c*
| The container whose elements to copy&period;
| *out&lowbar;true*
| The output iterator receiving elements satisfying `pred`&period;
| *out&lowbar;false*
| The output iterator receiving elements not satisfying `pred`&period;
| *pred*
| The predicate used to partition the elements&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
