[#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&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise&period; Note that in case the allocators are different this function places a _clone_ of `a` into `b`, and vice versa&period; See &lcub;Value Semantics&rcub; on details of the cloning that may happen&period;

== Synopsis

Declared in `&lt;bdld&lowbar;manageddatum&period;h&gt;`

[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]#
