Quick Q: Where do I have to write 'template' and 'typename'? -- StackOverflow

This question is an oldie but goodie. Note that in C++11 some of this becomes clearer, because it's now recommended to use constexpr and using template aliases instead of "traits" styles, and traits are one of the bigger (but not only) reasons to have a template refer to another template.

Where and why do I have to put the “template” and “typename” keywords?

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway? I have the following code: ...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.