[#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. == 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); ---- == Description 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. == Parameters [cols="1,4"] |=== | Name| Description | *a* | first object to exchange | *b* | second object to exchange |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#