#ifndef __TYPELIST__
#define __TYPELIST__
struct end_of_type_list {};
template <typename _Type, typename _List>
struct TypeList
{
typedef _Type this_type;
typedef _List this_list;
};
#define BUILD_TYPE_LIST_1(type1) \
TypeList<type1, end_of_type_list>
#define BUILD_TYPE_LIST_2(type1, type2) \
TypeList<type1, BUILD_TYPE_LIST_1(type2) >
#define BUILD_TYPE_LIST_3(type1, type2, type3) \
TypeList<type1, BUILD_TYPE_LIST_2(type2,type3) >
#define BUILD_TYPE_LIST_4(type1, type2, type3, type4) \
TypeList<type1, BUILD_TYPE_LIST_3(type2,type3,type4) >
#define BUILD_TYPE_LIST_5(type1, type2, type3, type4, type5) \
TypeList<type1, BUILD_TYPE_LIST_4(type2,type3,type4,type5) >
#define BUILD_TYPE_LIST_6(type1, type2, type3, type4, type5, type6) \
TypeList<type1, BUILD_TYPE_LIST_5(type2,type3,type4,type5,type6) >
#define BUILD_TYPE_LIST_7(type1, type2, type3, type4, type5, type6, type7) \
TypeList<type1, BUILD_TYPE_LIST_6(type2,type3,type4,type5,type6,type7) >
#define BUILD_TYPE_LIST_8(type1, type2, type3, type4, type5, type6, type7, type8) \
TypeList<type1, BUILD_TYPE_LIST_7(type2,type3,type4,type5,type6,type7,type8) >
#define BUILD_TYPE_LIST_9(type1, type2, type3, type4, type5, type6, type7, type8, type9) \
TypeList<type1, BUILD_TYPE_LIST_8(type2,type3,type4,type5,type6,type7,type8,type9) >
#define BUILD_TYPE_LIST_10(type1, type2, type3, type4, type5, type6, type7, type8, type9, type10) \
TypeList<type1, BUILD_TYPE_LIST_9(type2,type3,type4,type5,type6,type7,type8,type9,type10) >
#endif//__TYPELIST__
|