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

`swap` overloads

== Synopses

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

Swap the functors wrapped by `lhs` and `rhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FUNCTOR&gt;
void
xref:BloombergLP/bslstl/swap-044.adoc[swap](
    xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-0e.adoc[HashTable&lowbar;ComparatorWrapper&lt;FUNCTOR&gt;]& lhs,
    xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-0e.adoc[HashTable&lowbar;ComparatorWrapper&lt;FUNCTOR&gt;]& rhs);
----

[.small]#xref:BloombergLP/bslstl/swap-044.adoc[_» more&period;&period;&period;_]#

Swap the functors wrapped by `a` and `b`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FUNCTOR&gt;
void
xref:BloombergLP/bslstl/swap-040.adoc[swap](
    xref:BloombergLP/bslstl/HashTable_HashWrapper-03.adoc[HashTable&lowbar;HashWrapper&lt;FUNCTOR&gt;]& a,
    xref:BloombergLP/bslstl/HashTable_HashWrapper-03.adoc[HashTable&lowbar;HashWrapper&lt;FUNCTOR&gt;]& b);
----

[.small]#xref:BloombergLP/bslstl/swap-040.adoc[_» more&period;&period;&period;_]#

Exchange the nodes of the specified `a` and `b` objects&period;


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

[.small]#xref:BloombergLP/bslstl/swap-0ee.adoc[_» more&period;&period;&period;_]#

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


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

[.small]#xref:BloombergLP/bslstl/swap-0a.adoc[_» more&period;&period;&period;_]#

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


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

[.small]#xref:BloombergLP/bslstl/swap-015.adoc[_» more&period;&period;&period;_]#

Exchange the value and policies of `x` with those of `y`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY&lowbar;CONFIG,
    class HASHER,
    class COMPARATOR,
    class ALLOCATOR&gt;
void
xref:BloombergLP/bslstl/swap-0e8.adoc[swap](
    xref:BloombergLP/bslstl/HashTable.adoc[HashTable&lt;KEY&lowbar;CONFIG, HASHER, COMPARATOR, ALLOCATOR&gt;]& x,
    xref:BloombergLP/bslstl/HashTable.adoc[HashTable&lt;KEY&lowbar;CONFIG, HASHER, COMPARATOR, ALLOCATOR&gt;]& y);
----

[.small]#xref:BloombergLP/bslstl/swap-0e8.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| first comparator wrapper to swap
| *rhs*
| second comparator wrapper to swap
| *a*
| first hash wrapper to swap
| *b*
| second hash wrapper to swap
| *x*
| first hash table to swap
| *y*
| second hash table to swap
|===


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