Can you generate a variadic template pack from a size and its content?

Viewed 235

Consider the following code :

template<unsigned int... TSIZE>
struct Base {};
template<unsigned int TORDER, unsigned int TDIM>
struct Derived : public Base</* TDIM, TDIM, ... TDIM (TORDER times) */> {};

Do you think that a trick exists to correctly generate the template parameters of Base on the second line of this example ? For example I want Derived<3, 5> to inherit from Base<5, 5, 5>. How to do that ?

1 Answers
Related