bsl::visitR

Return the result of invoking the specified visitor with the currently active alternative of the specified variant, implicitly converting the result to the explicitly specified (template parameter) t_RET. If variant does not hold a value, throw an exception of type bsl::bad_variant_access. This function is provided in all language versions for compatibility with the C++03 version (see below), but in new code in C++11 and later, bsl::visit should be used instead of this function.

Synopsis

Declared in <bslstl_variant.h>

template<
    class t_RET,
    class t_VISITOR,
    class t_VARIANT>
t_RET
visitR(
    t_VISITOR& visitor,
    t_VARIANT&& variant);