When declaring a template you can choose either “class” or “typename” for a template parameter. Example:
template<typename T>
class vector {
// ...
};
or
template<typename class>
class vector {
// ...
};
So, which should you use, when? According to C++ in a Nutshell (pg 322) it doesn’t matter. The two are interchangeable in template declarations.
I have read that you should consider using “typename” when you want to document that your template is meant to work with any type and “class” when you want to document that it is designed to work with more complex data structures.