For templates I have seen both declarations:
template < typename T >
template < class T >
What\'s the difference?
And
For naming template parameters, typename and class are equivalent. §14.1.2:
There is no semantic difference between class and typename in a template-parameter.
typename however is possible in another context when using templates - to hint at the compiler that you are referring to a dependent type. §14.6.2:
A name used in a template declaration or definition and that is dependent on a template-parameter is assumed not to name a type unless the applicable name lookup finds a type name or the name is qualified by the keyword typename.
Example:
typename some_template::some_type
Without typename the compiler can't tell in general whether you are referring to a type or not.