[#BloombergLP-bslalg-RbTreeUtil-swap] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::swap :relfileprefix: ../../../ :mrdocs: Efficiently exchange the nodes in the specified `a` tree with the nodes in the specified `b` tree. This method provides the no‐throw exception‐safety guarantee. The behavior is undefined unless `a` and `b` are well‐formed (see `isWellFormed`). == Synopsis Declared in `<bslalg_rbtreeutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void swap( xref:BloombergLP/bslalg/RbTreeAnchor.adoc[RbTreeAnchor]* a, xref:BloombergLP/bslalg/RbTreeAnchor.adoc[RbTreeAnchor]* b); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#