Unique type identifying a selected trait metafunction.

Synopsis

Declared in <bslmf_selecttrait.h>

template<template<class> typename t_TRAIT = SelectTrait_False>
struct SelectTraitCase;

Description

This template expresses a class that is unique for the specified (template parameter) t_TRAIT metafunction. An instantiation of this template is the "compile‐time return value" of SelectTrait (see below). SelectTraitCase acts as a sort of compile‐time pointer‐to‐metafunction that holds the identity of a metafunction similar to the way a pointer‐to‐function holds (at run‐time) the identity of a function. As in the pointer‐to‐function case, a SelectTraitCase can also be used indirectly to evaluate t_TRAIT (at compile time). Also note that, when SelectTraitCase is specialized with the default t_TRAIT type parameter, SelectTrait_False, it essentially means that none of the traits specified to SelectTrait match.

Types

Name

Description

Eval

Evaluates t_TRAIT for the specified (template parameter) T type.

Type Aliases

Name

Description

Type

Alias for the selected trait case type.

Created with MrDocs