[#BloombergLP-bslstl-swap-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::swap
:relfileprefix: ../../
:mrdocs:

Efficiently exchange the values of the specified `a` and `b` objects&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY,
    class COMPARATOR&gt;
void
swap(
    xref:BloombergLP/bslstl/SetComparator.adoc[SetComparator&lt;KEY, COMPARATOR&gt;]& a,
    xref:BloombergLP/bslstl/SetComparator.adoc[SetComparator&lt;KEY, COMPARATOR&gt;]& b);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| first comparator participating in the swap
| *b*
| second comparator participating in the swap
|===


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