[#BloombergLP-bslalg-swap] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::swap :relfileprefix: ../../ :mrdocs: Efficiently exchange the values of the specified `a` and `b` objects. This function provides the no‐throw exception‐safety guarantee. The behavior is undefined unless the two objects were created with the same allocator. == Synopsis Declared in `<bslalg_hashtableanchor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap( xref:BloombergLP/bslalg/HashTableAnchor.adoc[HashTableAnchor]& a, xref:BloombergLP/bslalg/HashTableAnchor.adoc[HashTableAnchor]& b); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#