[#BloombergLP-bslstl-HashTable-09-swap]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable-09.adoc[HashTable&lt;UnorderedMapKeyConfiguration&lt;basic&lowbar;string&lt;char&gt; const, pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;, TransparentHash, TransparentEqualTo, allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;]::swap
:relfileprefix: ../../../
:mrdocs:

Exchange the value of this object, its `comparator` functor, its `hasher` functor, and its `maxLoadFactor` with those of the specified `other` object&period; Additionally, if `bslstl&colon;&colon;AllocatorTraits&lt;ALLOCATOR&gt;&colon;&colon;propagate&lowbar;on&lowbar;container&lowbar;swap` is `true`, then exchange the allocator of this object with that of the `other` object, and do not modify either allocator otherwise&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee unless any of the `comparator` or `hasher` functors throw when swapped, leaving both objects in a safely destructible, but otherwise unusable, state&period; The operation guarantees `O&lsqb;1&rsqb;` complexity&period; The behavior is undefined unless either this object has an allocator that compares equal to the allocator of `other`, or the trait `bslstl&colon;&colon;AllocatorTraits&lt;ALLOCATOR&gt;&colon;&colon;propagate&lowbar;on&lowbar;container&lowbar;swap` is `true`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
swap(xref:BloombergLP/bslstl/HashTable-06.adoc[HashTable&lt;UnorderedMapKeyConfiguration&lt;basic&lowbar;string&lt;char&gt; const, pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;, TransparentHash, TransparentEqualTo, allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;]& other);
----


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