[#BloombergLP-bslstl-Variant_Function-0b-functionImpl] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Variant_Function-0b.adoc[Variant_Function]::functionImpl :relfileprefix: ../../../ :mrdocs: Invoke `visitor` on the active alternative of `variant`. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static t_RET functionImpl( t_VISITOR&& visitor, t_VARIANT&& variant); ---- == Description This component‐private function invokes the specified `visitor` with the active alternative object of the specified `variant` and implicitly converts the return type to (template parameter) `t_RET`. The pre‐C++17 implementation is limited to invocations of the form `visitor(variant)`. The behavior is undefined unless (template parameter) `t_INDEX` is the index of the active alternative. == Return Value result of invoking `visitor`, converted to `t_RET` == Parameters [cols="1,4"] |=== | Name| Description | *visitor* | callable to invoke on the active alternative | *variant* | variant whose active alternative is visited |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#