Quick Links: |
Provide a typelist component. More...
bslmf::TypeList | Typelist of up to 20 types |
bslmf::TypeListTypeOf | Meta-function to get the type of a typelist member |
bslmf::TypeList0 | Typelist of 0 types |
bslmf::TypeList1 | Typelist of 1 type |
bslmf::TypeList2 | Typelist of 2 types |
bslmf::TypeList3 | Typelist of 3 types |
bslmf::TypeList4 | Typelist of 4 types |
bslmf::TypeList5 | Typelist of 5 types |
bslmf::TypeList6 | Typelist of 6 types |
bslmf::TypeList7 | Typelist of 7 types |
bslmf::TypeList8 | Typelist of 8 types |
bslmf::TypeList9 | Typelist of 9 types |
bslmf::TypeList10 | Typelist of 10 types |
bslmf::TypeList11 | Typelist of 11 types |
bslmf::TypeList12 | Typelist of 12 types |
bslmf::TypeList13 | Typelist of 13 types |
bslmf::TypeList14 | Typelist of 14 types |
bslmf::TypeList15 | Typelist of 15 types |
bslmf::TypeList16 | Typelist of 16 types |
bslmf::TypeList17 | Typelist of 17 types |
bslmf::TypeList18 | Typelist of 18 types |
bslmf::TypeList19 | Typelist of 19 types |
bslmf::TypeList20 | Typelist of 20 types |
bslmf::TypeList
provides a compile time list that holds up to 20 types. Users can access the different types the list contains (by index), and the length of the typelist. A bslmf::TypeList
is typically used when writing templatized classes that can store a variable amount of types, such as a bind or variant class. bslmf::TypeList
: typedef bslmf::TypeList<int, double, char> List;
LENGTH
member: assert(3 == List::LENGTH); // accessing the length of the list
TypeN
(where 1 <= t_N <= 20
), or another meta-function bslmf::TypeListTypeOf
: assert(1 == bsl::is_same<int, List::Type1>::value) assert(1 == bsl::is_same<double, List::Type2>::value) assert(1 == bsl::is_same<char, List::Type3>::value) typedef bslmf::TypeListTypeOf<1, List>::Type my_Type1; typedef bslmf::TypeListTypeOf<2, List>::Type my_Type2; typedef bslmf::TypeListTypeOf<3, List>::Type my_Type3; assert(1 == bsl::is_same<int, my_Type1>::value) assert(1 == bsl::is_same<double, my_Type2>::value) assert(1 == bsl::is_same<char, my_Type3>::value)
#define bslmf_TypeList bslmf::TypeList |
#define bslmf_TypeListNil bslmf::TypeListNil |
#define bslmf_TypeList1 bslmf::TypeList1 |
#define bslmf_TypeList2 bslmf::TypeList2 |
#define bslmf_TypeList3 bslmf::TypeList3 |
#define bslmf_TypeList4 bslmf::TypeList4 |
#define bslmf_TypeList5 bslmf::TypeList5 |
#define bslmf_TypeList6 bslmf::TypeList6 |
#define bslmf_TypeList7 bslmf::TypeList7 |
#define bslmf_TypeList8 bslmf::TypeList8 |
#define bslmf_TypeList9 bslmf::TypeList9 |
#define bslmf_TypeList10 bslmf::TypeList10 |
#define bslmf_TypeList11 bslmf::TypeList11 |
#define bslmf_TypeList12 bslmf::TypeList12 |
#define bslmf_TypeList13 bslmf::TypeList13 |
#define bslmf_TypeList14 bslmf::TypeList14 |
#define bslmf_TypeList15 bslmf::TypeList15 |
#define bslmf_TypeList16 bslmf::TypeList16 |
#define bslmf_TypeList17 bslmf::TypeList17 |
#define bslmf_TypeList18 bslmf::TypeList18 |
#define bslmf_TypeList19 bslmf::TypeList19 |
#define bslmf_TypeList20 bslmf::TypeList20 |
#define bslmf_TypeListTypeOf bslmf::TypeListTypeOf |
typedef bslmf::TypeList0 bslmf_TypeList0 |