Like Modern C++ Design's typelist, but doesn't use nested templates so the client use is a little easier on the eye. The main innovation is that recursion happens through the even and odd members -- this allows a faster and deeper compile-time binary splitting instead of a head/tail idiom, you only need to stop the recursion with an specialization on a single element or empty typelist.
T1... | A macstl::typelist of COM interfaces to implement. |
Public Types | |
typedef typelist< T2, T4, T6, T8, T10, T12, T14, T16, T18, T20, T22, T24, T26, T28, T30, T32 > | even |
A typelist with the even types. | |
typedef T1 | head |
The first type. | |
typedef typelist< T1, T3, T5, T7, T9, T11, T13, T15, T17, T19, T21, T23, T25, T27, T29, T31 > | odd |
A typelist with the odd types. | |
typedef typelist< T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T27, T28, T29, T30, T31, T32 > | tail |
A typelist with all the types except the first. |