Chapter 25. Templates

 

Behind that outside pattern the dim shapes get clearer every day.

It is always the same shape, only very numerous.

 
 --Charlotte Perkins Gilman
 

Every man of genius sees the world at a different angle from his fellows.

 
 --Havelock Ellis
 

...our special individuality, as distinguished from our generic humanity.

 
 --Oliver Wendell Holmes, Sr
<feature><title>Objectives</title>

In this chapter you will learn:

<objective>

To use function templates to conveniently create a group of related (overloaded) functions.

</objective>
<objective>

To distinguish between function templates and function-template specializations.

</objective>
<objective>

To use class templates to create a group of related types.

</objective>
<objective>

To distinguish ...

Get C How to Program, Fifth Edition 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.