[#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`. The behavior is undefined unless `get_allocator() == other.get_allocator()`. == Synopsis Declared in `<bslstl_function.h>` [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]#