Self-Review Exercises
-
18.1 State which of the following are true and which are false. If false, explain why.
Keywords
typename
andclass
as used with a template type parameter specifically mean “any user-defined class type.”A function template can be overloaded by another function template with the same function name.
Template parameter names among template definitions must be unique.
Each member-function definition outside its corresponding class template definition must begin with
template
and the same template parameters as its class template.
-
18.2 Fill in the blanks in each of the following:
Templates enable us to specify, with a single code segment, an entire range of related functions called , or an entire range of ...
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.