[#bsl-list-054-unique-0d]
= xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::unique
:relfileprefix: ../../
:mrdocs:

`unique` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;list&period;h&gt;`

Erase consecutive duplicate elements, keeping the first of each group&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/list-054/unique-0b.adoc[unique]();
----

[.small]#xref:bsl/list-054/unique-0b.adoc[_» more&period;&period;&period;_]#

Erase consecutive elements that compare equal under `binaryPredicate`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class EQ&lowbar;PREDICATE&gt;
void
xref:bsl/list-054/unique-04.adoc[unique](EQ&lowbar;PREDICATE binaryPredicate);
----

[.small]#xref:bsl/list-054/unique-04.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *binaryPredicate*
| predicate comparing consecutive elements
|===


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