[#BloombergLP-bdlb-VariantImp-apply-0f6] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/VariantImp.adoc[VariantImp]::apply :relfileprefix: ../../../ :mrdocs: Apply the specified `visitor` to this variant by passing the value this variant currently holds to the `visitor` object's `operator()`, and return the value (of template parameter `RET_TYPE`) returned by the `visitor`. If this variant is unset, a default constructed `bslmf::Nil` is passed to the `visitor`. == 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; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#