Does MSVC implement a late parsing scheme? In such a scheme, the compiler is not dependent on typename . It simply stores all tokens between the template definition templates, and when an instance of the template is created, it analyzes these tokens. Since he then knows what is and what is not a type, it will work without typename .
But if the compiler does not diagnose the missing typename when instantiating the template, then it does not meet the requirements.
Or is it really possible to conclude that iterator_category is either a type or a function, because it is followed by a pair of brackets ()?
Everything that matters depends on whether the name is dependent and qualified. Regardless of whether the template can infer that the name is always a type, it does not matter. This may be important for the quality of error messages in the absence of typename .
FWIW, there is no conclusion about iterator_category at the language level.
source share