samedi 22 août 2015

Expand a type containing an int pack

I've got a variadic template type looking like

template <int... Args> struct int_pack
{
    using type = int_pack<Args...>;
};

I now want to call a function Func with an int pack (e.g. int_pack<0, 1, 2>) so that I'm calling Func with Func(0, 1, 2) instead of Func(int_pack<0, 1, 2>{}).

Aucun commentaire:

Enregistrer un commentaire