[#BloombergLP-bslstl-variant_swapImpl-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::variant&lowbar;swapImpl
:relfileprefix: ../../
:mrdocs:

Swap `lhs` and `rhs` when `t&lowbar;VARIANT` is allocator&hyphen;aware&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;VARIANT&gt;
void
variant&lowbar;swapImpl(
    xref:bsl/true_type.adoc[bsl::true&lowbar;type] usesAllocator,
    t&lowbar;VARIANT& lhs,
    t&lowbar;VARIANT& rhs);
----

== Description

This component&hyphen;private function swaps the values of the specified `lhs` and `rhs` when the type (template parameter) `t&lowbar;VARIANT` is an allocator&hyphen;aware variant&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *usesAllocator*
| tag indicating `t&lowbar;VARIANT` is allocator&hyphen;aware
| *lhs*
| first variant to swap
| *rhs*
| second variant to swap
|===


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