BloombergLP::bdlb::VariantImp::apply

Same as the preceding overload, but for a const visitor.

Synopsis

Declared in <bdlb_variant.h>

template<
    class RET_TYPE,
    class VISITOR,
    class TYPE>
RET_TYPE
apply(
    VISITOR const& visitor,
    TYPE const& defaultValue);

Return Value

result of invoking visitor on the active alternative

Parameters

NameDescription
visitorcallable applied to the active alternative
defaultValuevalue passed to visitor when this variant is unset