[#BloombergLP-bslstl-Variant_SwapVisitor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant&lowbar;SwapVisitor
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private class is a visitor that is used to implement `bsl&colon;&colon;variant&colon;&colon;swap`&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;
class Variant&lowbar;SwapVisitor;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Variant_SwapVisitor/2constructor.adoc[`Variant&lowbar;SwapVisitor`]         [.small]#[constructor]#
| Create a `Variant&lowbar;SwapVisitor` object that, when invoked, will swap the visited alternative with the active alternative of the specified `variant`&period;
| xref:BloombergLP/bslstl/Variant_SwapVisitor/operator_call.adoc[`operator()`] 
| Swap the alternative at index `t&lowbar;INDEX` in `&ast;d&lowbar;variant&lowbar;p` with the specified `value` (i&period;e&period; the alternative that is being visited)&period;
|===



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