[#BloombergLP-bdlcc-SkipList-0a-addUnique-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/SkipList-0a.adoc[SkipList]::addUnique
:relfileprefix: ../../../
:mrdocs:

`addUnique` overloads

== Synopses

Declared in `&lt;bdlcc&lowbar;skiplist&period;h&gt;`

Add `key`&sol;`data` if `key` is not already in the list&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/SkipList-0a/addUnique-02.adoc[addUnique](
    KEY const& key,
    DATA const& data,
    bool* newFrontFlag = 0);
----

[.small]#xref:BloombergLP/bdlcc/SkipList-0a/addUnique-02.adoc[_» more&period;&period;&period;_]#

Add a unique key&sol;data pair and load a handle into `result`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/SkipList-0a/addUnique-01.adoc[addUnique](
    xref:BloombergLP/bdlcc/SkipList-0a/PairHandle.adoc[PairHandle]* result,
    KEY const& key,
    DATA const& data,
    bool* newFrontFlag = 0);
----

[.small]#xref:BloombergLP/bdlcc/SkipList-0a/addUnique-01.adoc[_» more&period;&period;&period;_]#

== Return Value

0 on success, and a non&hyphen;zero value if `key` already exists

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| key of the pair
| *data*
| data associated with `key`
| *newFrontFlag*
| if non&hyphen;null, set to whether the pair is at the front
| *result*
| receives a reference to the inserted pair
|===


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