7.4 Templates
Templates provide the ability to define C++ classes which support
generic programming techniques. Templates can be considered as a
powerful kind of macro facility. When a templated class or function is
used with a specific class or type, such as float
or int
,
the corresponding template code is compiled with that type substituted
in the appropriate places.