[#BloombergLP-bsltf-swap-08] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::swap :relfileprefix: ../../ :mrdocs: `swap` overloads == Synopses Declared in `<bsltf_degeneratefunctor.h>` Exchange the states of the specified `a` and `b`. Both `a` and `b` will be left in a moved‐into state. No allocations shall occur (so no exceptions will be thrown) unless `a` and `b` have different allocators. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bsltf/swap-06.adoc[swap]( xref:BloombergLP/bsltf/MoveOnlyAllocTestType.adoc[MoveOnlyAllocTestType]& a, xref:BloombergLP/bsltf/MoveOnlyAllocTestType.adoc[MoveOnlyAllocTestType]& b); ---- [.small]#xref:BloombergLP/bsltf/swap-06.adoc[_» more..._]# Exchange the states of the specified `a` and `b`. If the allocators match, both `a` and `b` will be left in a moved‐into state, otherwise, both will not. If `a` and `b` are the same object, this function will have no effect. No allocations shall occur (so no exceptions will be thrown) unless `a` and `b` have different allocators. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bsltf/swap-0f.adoc[swap]( xref:BloombergLP/bsltf/WellBehavedMoveOnlyAllocTestType.adoc[WellBehavedMoveOnlyAllocTestType]& a, xref:BloombergLP/bsltf/WellBehavedMoveOnlyAllocTestType.adoc[WellBehavedMoveOnlyAllocTestType]& b); ---- [.small]#xref:BloombergLP/bsltf/swap-0f.adoc[_» more..._]# Exchange the values of the specified `lhs` and `rhs` objects. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class FUNCTOR> void xref:BloombergLP/bsltf/swap-02.adoc[swap]( xref:BloombergLP/bsltf/DegenerateFunctor.adoc[DegenerateFunctor<FUNCTOR, true>]& lhs, xref:BloombergLP/bsltf/DegenerateFunctor.adoc[DegenerateFunctor<FUNCTOR, true>]& rhs); ---- [.small]#xref:BloombergLP/bsltf/swap-02.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#