if_select_type< cond, T1, T2 > Struct Template Reference
compile time selector trait that selects one of two types dependent on a boolean expression More...
#include <if_select_type.h>
Public Types | |
typedef T1 | type |
Detailed Description
template<bool cond, typename T1, typename T2>
struct if_select_type< cond, T1, T2 >
compile time selector trait that selects one of two types dependent on a boolean expression
Member Typedef Documentation
template<bool cond, typename T1, typename T2>
typedef T1 if_select_type< cond, T1, T2 >::type |
How to use it? Here is an example:
if_select_type<true, uint8_t, uint16_t>::type t1; // t1 = uint8_t if_select_type<false, uint8_t, uint16_t>::type t2; // t2 = uint16_t
The documentation for this struct was generated from the following file:
- include/config/type_traits/if_select_type.h