BloombergLP::bdlb::Variant4::apply

apply overloads

Synopses

Declared in <bdlb_variant.h>

Apply the specified visitor to this modifiable variant by passing the value this variant currently holds to the visitor object's operator(), and return the value returned by the visitor. If this variant is unset, a default constructed bslmf::Nil is passed to the visitor. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

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 returned by the visitor. If this variant is unset, a default constructed bslmf::Nil is passed to the visitor. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

Apply the specified visitor to this modifiable variant by passing the value this variant currently holds to the visitor object's operator(), and return the value returned by the visitor. If If this variant is unset, a default constructed bslmf::Nil is passed to the visitor. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

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 returned by the 'visitor. If this variant is unset, a default constructed bslmf::Nil is passed to the visitor. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

Apply the specified visitor to this modifiable variant by passing the value (of template parameter TYPE) 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.

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

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.

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

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

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

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.

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

Apply the specified visitor to this modifiable variant by passing the value (of template parameter TYPE) this variant currently holds to the visitor object's operator(), and return the value returned by the visitor. If this variant is unset, the specified defaultValue of template parameter TYPE is passed to the visitor. TYPE must be the same as one of the types that this variant can hold. The behavior is undefined unless this variant is unset or holds a value of template parameter TYPE. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

Apply the specified visitor to this variant by passing the value (of template parameter TYPE) this variant currently holds to the visitor object's operator(), and return the value returned by the visitor. If this variant is unset, the specified defaultValue of template parameter TYPE is passed to the visitor. TYPE must be the same as one of the types that this variant can hold. The behavior is undefined unless this variant is unset or holds a value of template parameter TYPE. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

Apply the specified visitor to this modifiable variant by passing the value (of template parameter TYPE) this variant currently holds to the visitor object's operator(), and return the value returned by the visitor. If this variant is unset, the specified defaultValue of template parameter TYPE is passed to the visitor. TYPE must be the same as one of the types that this variant can hold. The behavior is undefined unless this variant is unset or holds a value of template parameter TYPE. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

Apply the specified visitor to this variant by passing the value (of template parameter TYPE) this variant currently holds to the visitor object's operator(), and return the value returned by the visitor. If this variant is unset, the specified defaultValue of template parameter TYPE is passed to the visitor. TYPE must be the same as one of the types that this variant can hold. The behavior is undefined unless this variant is unset or holds a value of template parameter TYPE. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.

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

Apply the specified visitor to this modifiable variant by passing the value (of template parameter TYPE) 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, the specified defaultValue of template parameter TYPE is passed to the visitor. TYPE must be the same as one of the types that this variant can hold. The behavior is undefined unless this variant is unset or holds a value of template parameter TYPE.

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

Apply the specified visitor to this variant by passing the value (of template parameter TYPE) 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, the specified defaultValue of template parameter TYPE is passed to the visitor. TYPE must be the same as one of the types that this variant can hold. The behavior is undefined unless this variant is unset or holds a value of template parameter TYPE.

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

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);
» more...

Apply the specified visitor to this variant by passing the value (of template parameter TYPE) 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, the specified defaultValue of template parameter TYPE is passed to the visitor. TYPE must be the same as one of the types that this variant can hold. The behavior is undefined unless this variant is unset or holds a value of template parameter TYPE.

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