[#BloombergLP-bslalg-SelectTrait] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::SelectTrait :relfileprefix: ../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, class TRAIT1, class TRAIT2 = xref:BloombergLP/bslalg/TypeTraitNil.adoc[TypeTraitNil], class TRAIT3 = xref:BloombergLP/bslalg/TypeTraitNil.adoc[TypeTraitNil], class TRAIT4 = xref:BloombergLP/bslalg/TypeTraitNil.adoc[TypeTraitNil], class TRAIT5 = xref:BloombergLP/bslalg/TypeTraitNil.adoc[TypeTraitNil]> struct SelectTrait; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/SelectTrait/Type.adoc[`Type`] | The actual trait that was selected, or `TypeTraitNil` if no trait was selected. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/SelectTrait/_04enum.adoc[`Unnamed enum`] | Compile‐time selection index for the chosen trait. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#