C++ keywords: typename
From cppreference.com
[edit] Usage
- In a class template or function template, typename can be used as an alternative to class to declare templated types.
- Inside a template definition, typename can be used to declare that a dependent name is a type.
[edit] Example
template <typename T> void foo (const std::vector<T> &v) { // std::vector<T>::const_iterator is a dependent name, // so using it as a type requires the addition of the // typename keyword typename std::vector<T>::const_iterator it = v.begin(); }