description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|
Learn more about: conditional Class |
conditional Class |
11/04/2016 |
|
|
ece9f539-fb28-4e26-a79f-3264bc984493 |
Selects one of two types, depending on the specified condition.
template <bool B, class T1, class T2>
struct conditional;
template <bool _Test, class _T1, class _T2>
using conditional_t = typename conditional<_Test, _T1, _T2>::type;
B
The value that determines the selected type.
T1
The type result when B is true.
T2
The type result when B is false.
The template member typedef conditional<B, T1, T2>::type
evaluates to T1 when B evaluates to true
, and evaluates to T2 when B evaluates to false
.
Header: <type_traits>
Namespace: std