Understanding Template Terminology
We'll cover the following
Types of templates
So far in this section, we have used the general term templates. However, there are four different terms describing the kind of templates we have written:
Function template is the term used for a templated function. An example is the
max
template seen previously.Class template is the term used for a templated class (which can be defined either with the
class
,struct
, orunion
keyword). An example is thevector
class we wrote in the previous lesson.Variable template is the term used for templated variables, such as the
NewLine
template from the previous section.Alias template is the term used for templated type aliases. We’ll see examples of alias templates in the next section.
Get hands-on with 1400+ tech skills courses.