[#BloombergLP-bdlb-swap-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::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;

== Synopsis

Declared in `&lt;bdlb&lowbar;nullableallocatedvalue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
void
swap(
    xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue&lt;TYPE&gt;]& a,
    xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue&lt;TYPE&gt;]& b);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
