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 ?
With a bit of TMP, this isn’t that hard after all:
Live example.