I am wondering if it's possible to combine policy classes using variadic template-template parameters such that each policy may have it's own template pack. It seems like you can only share a single template pack amongst all policies but I hope that's not the case.
The following seems to be what's possible:
template <
class T,
template <class, typename...> class Policy1,
template <class, typename...> class Policy2,
template <class, typename...> class Policy3,
typename... Args
>
struct PolicyClass
: public Policy1 <ObjT, Args...>
, public Policy2 <ObjT, Args...>
, public Policy3 <ObjT, Args...> {}
I'm hoping each policy can have it's own pack so I could make something like this (?):
template <class T>
struct implementedPolicy1 {};
template <class T>
struct implementedPolicy2 {};
template <class T, class A>
struct implementedPolicy3 {};
PolicyClass <ObjT,
implementedPolicy1,
implementedPolicy2,
implementedPolicy3<AType>
>
The idea being each of the policies are all using the same object type but the third has some further templating. I know that's incorrect code above - just trying to illustrate what I'd like to be able to do.
Thanks