This component‐private constexpr variable template is true if t_VARIANT is a specialization of bsl::variant, and t_STD_VARIANT is the std::variant type (possibly with added cvref‐qualification) that has the same sequence of alternatives, and each alternative of t_VARIANT is constructible from the corresponding alternative of t_STD_VARIANT (with cv‐qualification and value category matching that of t_STD_VARIANT). Note that we use bsl::conjunction_v for its short‐circuiting properties: if t_STD_VARIANT isn`t a std::variant` (for example, if it`s a `bsl::variant`) we avoid recursing into the constraints of `bsl::variant.

Synopsis

Declared in <bslstl_variant.h>

template<
    class t_VARIANT,
    class t_STD_VARIANT>
constexpr bool variant_constructsFromStd = bsl::conjunction_v<
      bsl::is_same<typename Variant_CorrespondingStdVariant<t_VARIANT>::type,
                   bsl::remove_cvref_t<t_STD_VARIANT>>,
      std::is_constructible<bsl::remove_cvref_t<t_STD_VARIANT>,
                            t_STD_VARIANT>>;

Created with MrDocs