BloombergLP::bdlb::VariantImp::apply

Apply visitor to the held value and return RET_TYPE.

Synopsis

Declared in <bdlb_variant.h>

template<
    class RET_TYPE,
    class VISITOR>
RET_TYPE
apply(VISITOR const& 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

NameDescription
visitorcallable applied to the active alternative