I
IR
Hello,
Does anyone know why this declaration compiles:
template< template<typename> class T>
class X { /*...*/ };
while this one doesn't:
template< template<typename> typename T>
class X { /*...*/ };
I thought "class" and "typename" were equivalent in template
declarations?
I don't think it's my compiler's fault (VC8) because I couldn't find
references to syntaxes like the second one on the web, only like the
first one, so there must be a logical reason...
Even Comeau's FAQ uses the first form, without even mentioning the
second one.
Thanks by advance.
Does anyone know why this declaration compiles:
template< template<typename> class T>
class X { /*...*/ };
while this one doesn't:
template< template<typename> typename T>
class X { /*...*/ };
I thought "class" and "typename" were equivalent in template
declarations?
I don't think it's my compiler's fault (VC8) because I couldn't find
references to syntaxes like the second one on the web, only like the
first one, so there must be a logical reason...
Even Comeau's FAQ uses the first form, without even mentioning the
second one.
Thanks by advance.