[#BloombergLP-bdlb-swap-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::swap
:relfileprefix: ../../
:mrdocs:

Swap the values of the specified `a` and `b` objects&period; This method provides the no&hyphen;throw guarantee if the `TYPE` template parameter has a no&hyphen;throw `swap` and the two variant objects being swapped has the same type&semi; otherwise this method provides the basic guarantee&period;

== Synopsis

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

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


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