[#BloombergLP-bslstl-Variant_SwapVisitor] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant_SwapVisitor :relfileprefix: ../../ :mrdocs: This component‐private class is a visitor that is used to implement `bsl::variant::swap`. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_VARIANT> class Variant_SwapVisitor; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_SwapVisitor/2constructor.adoc[`Variant_SwapVisitor`] [.small]#[constructor]# | Create a `Variant_SwapVisitor` object that, when invoked, will swap the visited alternative with the active alternative of the specified `variant`. | xref:BloombergLP/bslstl/Variant_SwapVisitor/operator_call.adoc[`operator()`] | Swap the alternative having index (template parameter) `t_INDEX` in `*d_variant_p` with the specified `value` (i.e. the alternative that is being visited). The behavior is undefined unless `t_INDEX` is the index of the active alternative of `*d_variant_p` (or, in C++03, the index of an alternative that has the same type as the active alternative). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#