[#BloombergLP-bdld-swap] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::swap :relfileprefix: ../../ :mrdocs: Exchange the values of the specified `a` and `b` objects. This function provides the no‐throw exception‐safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise. Note that in case the allocators are different this function places a _clone_ of `a` into `b`, and vice versa. See {Value Semantics} on details of the cloning that may happen. == Synopsis Declared in `<bdld_manageddatum.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap( xref:BloombergLP/bdld/ManagedDatum.adoc[ManagedDatum]& a, xref:BloombergLP/bdld/ManagedDatum.adoc[ManagedDatum]& b); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#