This is a common point of confusion for many (including the General Programming page on Wikipedia, some C ++ lessons, and other answers on this page). As for C ++, there is no such thing as a "template class", there is only a "template template". . The way to read this phrase is a "template for a class", as opposed to a "template for a function", which is a "template for a function". Again: classes do not define patterns, patterns define classes (and functions). For example, this is a template, in particular a class template, but it is not a class:
template<typename T> class MyClassTemplate { ... };
The MyClassTemplate<int> declaration is a class, or pedantically, a template-based class. There are no special properties for a class based on a template and a class not based on a template. Special properties have the template itself.
The phrase "template class" does not mean anything, because the word "template" does not make sense as an adjective when applied to the noun "class" in relation to C ++. This implies the existence of a class in which there is (or defines) a template that is not a concept that exists in C ++.
I understand the general confusion, since this is probably based on the fact that the words appear in the order of the "template class" in the language itself, which is a completely different story.
Not Sure May 18 '09 at 20:54 2009-05-18 20:54
source share