This component‐private metafunction checks whether a conversion from a pointer type to (template parameter) t_TYPE is narrowing.

Synopsis

Declared in <bslstl_variant.h>

template<
    class t_TYPE,
    class = void>
struct Variant_CheckForP1957R2
    : bsl::true_type

Description

This component‐private metafunction checks whether a conversion from a pointer type to (template parameter) t_TYPE is narrowing. It is instantiated only for bool, and its behavior depends on whether the compiler has implemented P1957R2.

Base Classes

Name

Description

bsl::true_type

Metafunction representing the boolean constant true.

Specializations

Name

Description

Variant_CheckForP1957R2<t_TYPE, bsl::void_t<decltype(Variant_ArrayHelper<t_TYPE>{{"bc"}})>>

Detect a compiler that implements P1957R2 (and rejects narrowing).

Created with MrDocs