In general it is not possible for the non-psychic compiler to know that Seq<T>::iterator is intended as the name of a type (type name) rather than the name of something that is not a type (such as a function or a template). If we want to state that something should be treated as a type, we can do so using the typename keyword. For more details you can read a C++ standard text. I got the above information from The C++ Programming Language, Special Edition by Stroustrup, the Creator of C++, section C.13.5 Typename and Template.