jeudi 28 juillet 2016

Is it possible to interleave parameter packs?

Is it possible, with C++11/14/1z, to have a templated construct with two parameter packs, and within it, instantiate some other templated construct with the two packs inteleaved? i.e. if the first pack is T1_1, T1_2, T1_3 and the second pack is T2_1, T2_2 and T2_3, the interleaved pack will be T1_1, T2_1, T1_2, T2_2, T1_3, T2_3? My guess would be "no", since an ellipsis should not be able to apply to two parameter pack element designators; but perhaps some kind of tuple-construction or recursive-instantiation trick could work?

Aucun commentaire:

Enregistrer un commentaire