When defining a template, the format is:
template <class T> returnType templateName{...};
My question is: will the class
keyword inside the above template declaration makes data type T a class? The question is explained below:
inside <class T>
, T should be a name of data type, and it's preceded by "class". When learning class in cpp, I know that a class is defined:class ClassName{...};
. So my understanding is that everything followed by a class keyword would be the name of a class. In the case of the template declaration, there is also a class
keyword before T
. Is this means the data types in CPP are also classes?