apply overloads

Synopses

Declared in <bdlb_variant.h>

Apply visitor to the held value of this modifiable variant.

template<class VISITOR>
VISITOR::ResultType
apply(VISITOR& visitor)
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held value and return its result.

template<class VISITOR>
VISITOR::ResultType
apply(VISITOR& visitor) const
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held value of this modifiable variant.

template<class VISITOR>
VISITOR::ResultType
apply(VISITOR const& visitor)
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held value and return its result.

template<class VISITOR>
VISITOR::ResultType
apply(VISITOR const& visitor) const
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held TYPE value of this modifiable variant.

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

Apply visitor to the held value and return RET_TYPE.

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

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

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

Apply visitor to the held value and return RET_TYPE.

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

Apply visitor to the held TYPE value of this modifiable variant.

template<
    class VISITOR,
    class TYPE>
VISITOR::ResultType
apply(
    VISITOR& visitor,
    TYPE const& defaultValue)
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held TYPE value of this variant.

template<
    class VISITOR,
    class TYPE>
VISITOR::ResultType
apply(
    VISITOR& visitor,
    TYPE const& defaultValue) const
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held TYPE value of this modifiable variant.

template<
    class VISITOR,
    class TYPE>
VISITOR::ResultType
apply(
    VISITOR const& visitor,
    TYPE const& defaultValue)
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held TYPE value of this variant.

template<
    class VISITOR,
    class TYPE>
VISITOR::ResultType
apply(
    VISITOR const& visitor,
    TYPE const& defaultValue) const
requires Variant_ReturnValueHelper<VISITOR>::value == 1;

Apply visitor to the held TYPE value of this modifiable variant.

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

Apply visitor to the held TYPE value of this variant.

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

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

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

Apply visitor to the held TYPE value of this variant.

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

Return Value

result of invoking visitor on the active alternative

Parameters

Name

Description

visitor

callable applied to the active alternative

defaultValue

value passed to visitor when this variant is unset

Created with MrDocs