[#BloombergLP-bdlb-VariantImp-apply-0f6] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/VariantImp.adoc[VariantImp]::apply :relfileprefix: ../../../ :mrdocs: Apply `visitor` to the held value and return `RET_TYPE`. == Synopsis Declared in `<bdlb_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class RET_TYPE, class VISITOR> RET_TYPE apply(VISITOR& visitor) const; ---- == Description If this variant is unset, a default constructed `bslmf::Nil` is passed to the `visitor`. == Return Value result of invoking `visitor` on the active alternative == Parameters [cols="1,4"] |=== | Name| Description | *visitor* | callable applied to the active alternative |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#