Chapter 1, Introduction to Templates
Why do we need templates? What advantages do they provide?
There are several benefits to using templates: they help us avoid writing repetitive code, they foster the creation of generic libraries, and they can help us write less and better code.
How do you call a function that is a template? What about a class that is a template?
A function that is a template is called a function template. Similarly, a class that is a template is called a class template.
How many kinds of template parameters exist and what are they?
There are three kinds of template parameters: type template parameters, non-type template parameters, and template template parameters.
What is partial specialization? What about full specialization?
Specialization is the technique of providing an alternative implementation for a template, called the primary template...