Consider a template class C with a set of policies through a template template parameter and two policy definitions:
template<class T> struct PolicyOne { };
template<class T, int U, int V> struct PolicyTwo { };
template<class T, template<class> class POLICY> struct C { POLICY<T> policy; };
void f()
{
C<int, PolicyOne> mc1;
C<int, PolicyTwo<1, 2> > mc2;
}
PolicyTwodoes not work due to the wrong number of template arguments. Is it possible to use a parameter PolicyTwolike POLICYtemplate if you specify types for additional template parameters?
I use C ++ 03, so alias declarations are not available. I know this question , but I do not see a solution for my problem.
source
share