[#absl-c_unique_copy-0f]
= xref:absl.adoc[absl]::c&lowbar;unique&lowbar;copy
:relfileprefix: ../
:mrdocs:

`c&lowbar;unique&lowbar;copy` overloads

== Synopses

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

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;unique&lowbar;copy()` function to copy a container&apos;s elements while removing any elements containing duplicate values&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename C,
    typename OutputIterator&gt;
constexpr
OutputIterator
xref:absl/c_unique_copy-076.adoc[c&lowbar;unique&lowbar;copy](
    C const& c,
    OutputIterator result);
----

[.small]#xref:absl/c_unique_copy-076.adoc[_» more&period;&period;&period;_]#

Overload of `c&lowbar;unique&lowbar;copy()` for using a predicate evaluation other than `&equals;&equals;` for comparing uniqueness of the element values&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename C,
    typename OutputIterator,
    typename BinaryPredicate&gt;
constexpr
OutputIterator
xref:absl/c_unique_copy-07d.adoc[c&lowbar;unique&lowbar;copy](
    C const& c,
    OutputIterator result,
    BinaryPredicate&& pred);
----

[.small]#xref:absl/c_unique_copy-07d.adoc[_» more&period;&period;&period;_]#

== Return Value

An iterator to the end of the copied range in the output&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *c*
| The container whose elements to copy&period;
| *result*
| The output iterator receiving the copied elements&period;
| *pred*
| The binary predicate used to compare adjacent elements&period;
|===


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