How can I create a n way Cartesian product of type lists in C++?

后端 未结 3 647
既然无缘
既然无缘 2020-12-30 23:45

Self explanatory.

Basically, say I have type lists like so:

using type_list_1 = type_list;
using type_list_2 = type_list

        
3条回答
  •  孤城傲影
    2020-12-31 00:11

    With Boost.Mp11, this is a short one-liner (as always):

    using result = mp_product<
        type_list,
        type_list_1, type_list_2, type_list_3>;
    

    Demo.

提交回复
热议问题