When is the “typename” keyword necessary? [duplicate]
Short answer: Whenever referring to a nested name that is a dependent name, i.e. nested inside a template instance with unknown parameter. Long answer: There are three tiers of entities in C++: values, types, and templates. All of those can have names, and the name alone doesn’t tell you which tier of entity it is. … Read more