My goal is to make this template work:
template <size_t... Ns>
struct mult
{
using cross = ?; // variadic size_t
static_assert(sizeof...(cross) + 1 == sizeof...(Ns), "");
};
So I can use it like this:
mult<2,3,5>::cross // 6,15 // because 2*3=6, 3*5=15
mult<3,5,7,11>::cross // 15,35,77 // because 3*5=15, 5*7=35, 7*11=77
Because I need to make this:
// tuple of arrays
std::tuple<std::array<size_t, mult<Ns...>::cross>...> cross_arrays;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…