[#bsl-swap-026] = xref:bsl.adoc[bsl]::swap :relfileprefix: ../ :mrdocs: Exchange the targets held by the specified `a` and `b` functions. == Synopsis Declared in `<bslstl_function.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class PROTOTYPE> void swap( xref:bsl/function-0a.adoc[function<PROTOTYPE>]& a, xref:bsl/function-0a.adoc[function<PROTOTYPE>]& b) noexcept; ---- == Description The behavior is undefined unless `a.get_allocator() == b.get_allocator()`. == Parameters [cols="1,4"] |=== | Name| Description | *a* | first function participating in the swap | *b* | second function participating in the swap |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#