template <typename ... Args> struct typelist; typelist????
template <typename A?? typename B> struct concat; ??????????????typelist???β??????
template <typename... A?? typename... B>
struct concat<typelist<A...>?? typelist<B...> >
{
typedef typelist<A...?? B...> type;
}; ????????typelist????????
template<typename T?? typename... TList>
struct concat<typelist<TList...>?? T >
{
typedef typelist<TList...?? T> type;
}; ????????????typelistβ???????
template<typename T?? typename... TList>
struct concat< T?? typelist<TList...> >
{
typedef typelist<T?? TList...>  type;
}; ????????????typelist???????????
template <typename T ??int I?? typename K = defaultPolicys> struct replace; ??????T?滻K=typelist??Iλ???????????
template <typename T?? int I?? typename H??typename ...Tail> struct replace<T??I??typelist<H??Tail...>>
{
typedef typename concat<H?? typename replace<T?? I-1?? typelist<Tail...>>::type>::type type;
}; ???????壬??????
template <typename T??typename H??typename... Tail> struct replace<T??0??typelist<H??Tail...>>
{
typedef typelist<T??Tail...> type;
}; ???????壬??????
template <typename T ??int I> struct Custom
{
const static int index = I;
typedef T newType;
}; ?????????????
template <typename ...> struct CEO; CEO??Policys???????
template <> struct CEO<>
{
typedef defaultPolicys myPolicys; CEO<>???????Policys
};
template <typename T> struct CEO<T>
{
typedef typename replace<typename T::newType??T::index>::type myPolicys;
}; ????嵥??Policy??????????
//template <typename T??typename U> struct CEO<T??U>{ typedef typename replace<typename U::newType??U::index??typename CEO<T>::myPolicys>::type myPolicy;};
template <typename T??typename ... Tail> struct CEO<T??Tail...>
{
typedef typename replace<typename T::newType??T::index??typename CEO<Tail...>::myPolicys>::type myPolicys;
}; ???????Policys??????????
??????′???????????
CEO< Custom<string??2>??Custom<char??3>??Custom<string??4> > ::myPolicys
myPolicys ????? typelist<int ??short ??string ??char ??string>
????----------------------------------------------------------------------------------------------------------------------------------------
??????δ??????????
??????????typelist?У??????????????????????????????CEO<>???????????????
????CEO<Custom<xType??xIndex>> ?????滻?????????????????
?????????????е?????巽??????????????????????????????ü?к??麯???????
?????????????????????????????????????????????????????Policys????????????typelist???ɡ?
???????C++ Template?? ????У?????????????μ??????????????????????к?????????????????????C++ ??????????н?????typelist???????????C++14?????????????
??????????????????????????????±??? ???????????????????????????????????????о?????????????