[#bsl-function-0a-swap]
= xref:bsl.adoc[bsl]::xref:bsl/function-0a.adoc[function]::swap
:relfileprefix: ../../
:mrdocs:

Exchange the targets held by this `function` and the specified `other` `function`&period; The behavior is undefined unless `get&lowbar;allocator() &equals;&equals; other&period;get&lowbar;allocator()`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
swap(xref:bsl/function-0a.adoc[function]& other) noexcept;
----


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