BloombergLP::bslalg::SelectTrait

Select one trait out of several that the parameterized type T may possess. If T has the parameterized trait TRAIT1, then the nested Type is TRAIT1, else if T has an optionally parameterized TRAIT2, then Type is TRAIT2, etc. Also computes an integral selection constant and meta-value. If T has none of the parameterized TRAIT*, then the nested Type is TypeTraitNil.

Synopsis

Declared in <bslalg_selecttrait.h>

template<
    class TYPE,
    class TRAIT1,
    class TRAIT2 = TypeTraitNil,
    class TRAIT3 = TypeTraitNil,
    class TRAIT4 = TypeTraitNil,
    class TRAIT5 = TypeTraitNil>
struct SelectTrait;

Type Aliases

NameDescription
Type The actual trait that was selected, or TypeTraitNil if no trait was selected.

Enums

NameDescription
Unnamed enum Compile-time selection index for the chosen trait.