You cannot give default arguments to the same template
parameters in different declarations in the same scope. The compiler
will not allow the following
example:
template<class T = char> class X;
template<class T = char> class X { };
If one template
parameter has a default argument, then all template parameters following
it must also have default arguments. For example, the compiler will
not allow the following:
template<class T = char, class U, class V = int> class X { };
Template
parameter
U needs a default argument or the default
for
T must be removed.