[#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`. == Synopsis Declared in `<bslstl_function.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap(xref:bsl/function-0a.adoc[function]& other) noexcept; ---- == Description The behavior is undefined unless `get_allocator() == other.get_allocator()`. == Parameters [cols="1,4"] |=== | Name| Description | *other* | function with which to exchange targets |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#