[#bsl-unordered_multimap-0b0-swap]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_multimap-0b0.adoc[unordered&lowbar;multimap]::swap
:relfileprefix: ../../
:mrdocs:

Exchange the contents of this object with those of `other`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
swap(xref:bsl/unordered_multimap-0b0.adoc[unordered&lowbar;multimap]& other) noexcept(&sol;&ast; see-below &ast;&sol;);
----

== Description

Exchange the value, hasher, key&hyphen;equality functor, and `max&lowbar;load&lowbar;factor` of this object with those of the specified `other` object&semi; also exchange the allocator of this object with that of `other` if the (template parameter) type `ALLOCATOR` has the `propagate&lowbar;on&lowbar;container&lowbar;swap` trait, and do not modify either allocator otherwise&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if and only if both the (template parameter) types `HASH` and `EQUAL` provide no&hyphen;throw swap operations&semi; if an exception is thrown, both objects are left in valid but unspecified states&period; This operation guarantees `O&lsqb;1&rsqb;` complexity&period; The behavior is undefined unless either this object was created with the same allocator as `other` or `ALLOCATOR` has the `propagate&lowbar;on&lowbar;container&lowbar;swap` trait&period;

== Exception specification

This function is potentially-throwing unless `AllocatorTraits&colon;&colon;is&lowbar;always&lowbar;equal&colon;&colon;value &amp;&amp; bsl&colon;&colon;is&lowbar;nothrow&lowbar;swappable&lt;HASH&gt;&colon;&colon;value &amp;&amp; bsl&colon;&colon;is&lowbar;nothrow&lowbar;swappable&lt;EQUAL&gt;&colon;&colon;value`.

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| unordered multimap to swap with
|===


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