4 ms·
I think typename is only required inside of template definitions. > The keyword typename must only be used in template declarations and definitions and only in
by grandmczeb 6y ago
I think typename is only required inside of template definitions.
> The keyword typename must only be used in template declarations and definitions and only in contexts in which dependent names can be used.
https://en.cppreference.com/w/cpp/language/dependent_name https://en.cppreference.com/w/cpp/language/dependent_name
- InfiniteRand 6y agoThe example given in the original post involves a dependent name
- grandmczeb 6y agoIt has to be both dependent and inside of a template definition. The example is a normal function declaration. The linked article has a couple examples.