[#BloombergLP-bslstl-Variant_FunctionId-functionImpl]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Variant_FunctionId.adoc[Variant&lowbar;FunctionId]::functionImpl
:relfileprefix: ../../../
:mrdocs:

Invoke `visitor` with an index tag and the active alternative&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
t&lowbar;RET
functionImpl(
    t&lowbar;VISITOR&& visitor,
    t&lowbar;VARIANT&& variant);
----

== Description

This component&hyphen;private function invokes the specified `visitor` with a `bsl&colon;&colon;in&lowbar;place&lowbar;index&lowbar;t` tag representing the value of (template parameter) `t&lowbar;INDEX` and the active alternative object of the specified `variant`, implicitly converting the return type to (template parameter) `t&lowbar;RET`&period; The behavior is undefined unless `t&lowbar;INDEX` is the index of the active alternative&period;

== Return Value

result of invoking `visitor`, converted to `t&lowbar;RET`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *visitor*
| callable to invoke with the index tag and alternative
| *variant*
| variant whose active alternative is visited
|===


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