Determine whether t_TYPE occurs exactly once in t_VARIANT.

Synopsis

Declared in <bslstl_variant.h>

template<
    class t_TYPE,
    class t_VARIANT>
struct Variant_HasUniqueType;

Description

This component‐private metafunction derives from bsl::true_type if (template parameter) t_TYPE occurs exactly once as an alternative of (template parameter) t_VARIANT, and bsl::false_type otherwise.

An alternative must have the same cv‐qualification as t_TYPE in order to be counted. The primary template (used when t_VARIANT is not a bsl::variant) is not defined.

Specializations

Name

Description

Variant_HasUniqueType<t_TYPE, bsl::variant<t_HEAD, t_TAIL...>>

Determine whether t_TYPE occurs exactly once in a bsl::variant.

Created with MrDocs