I am using variadic parameter packs for policy based class design.
template
class IShader : public Policies... {
};
I think the simplest answer is to create template type wrappers for your parameter packs. For example:
template
struct Attributes {};
template
struct Policies {};
Then you can declare your IShader type:
template
class IShader;
Create your implementation as a specialization. Note that in a specialization, you can have multiple parameter pack arguments.
template
class IShader, ApiType, Policies>
: public PolicyList...
{
...
};
Then you can even allow the user to specify the arguments in different orders (make sure you forward the constructors if doing it this way via inheritance):
template
struct IShader, Attributes
: public IShader, ApiType, Policies>
{
using IShader, ApiType, Policies>::IShader;
};
If you're being really fancy, you can even use metaprogramming tricks to allow the arguments in any order without enumerating all orders. This is left as an exercise to the reader. :)