Loki序列有多少个元素?

时间:2013-01-22 08:18:33

标签: c++ boost-mpl loki typelist

我知道boost MPL列表或向量具有半定义的最大长度,但在大约30个元素之后,编译器讨厌我。 Loki序列可以有多少个元素,用户可以定义吗?

1 个答案:

答案 0 :(得分:1)

implementation显示18个隐藏的模板参数,因此这应该是上限

     template
     <
         typename T1  = NullType, typename T2  = NullType, typename T3  = NullType,
         typename T4  = NullType, typename T5  = NullType, typename T6  = NullType,
         typename T7  = NullType, typename T8  = NullType, typename T9  = NullType,
         typename T10 = NullType, typename T11 = NullType, typename T12 = NullType,
         typename T13 = NullType, typename T14 = NullType, typename T15 = NullType,
         typename T16 = NullType, typename T17 = NullType, typename T18 = NullType
     > 
     struct MakeTypelist { /* stuff */ };