[#BloombergLP-bsltf-swap-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::swap :relfileprefix: ../../ :mrdocs: Exchange the states of the specified `a` and `b`. == Synopsis Declared in `<bsltf_wellbehavedmoveonlyalloctesttype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap( xref:BloombergLP/bsltf/WellBehavedMoveOnlyAllocTestType.adoc[WellBehavedMoveOnlyAllocTestType]& a, xref:BloombergLP/bsltf/WellBehavedMoveOnlyAllocTestType.adoc[WellBehavedMoveOnlyAllocTestType]& b); ---- == Description 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. == Parameters [cols="1,4"] |=== | Name| Description | *a* | first object to exchange | *b* | second object to exchange |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#