[#BloombergLP-bslstl-swap-0a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::swap :relfileprefix: ../../ :mrdocs: Efficiently exchange the values of the specified `a` and `b` objects. This function provides the no‐throw exception‐safety guarantee. == Synopsis Declared in `<bslstl_setcomparator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class COMPARATOR> void swap( xref:BloombergLP/bslstl/SetComparator.adoc[SetComparator<KEY, COMPARATOR>]& a, xref:BloombergLP/bslstl/SetComparator.adoc[SetComparator<KEY, COMPARATOR>]& b); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#