10.2. AIX template implementations
The template mechanism provides a way of defining general container types, such as list, vector, and stack, where the specific type of the elements is left as a parameter. Two types of templates can be defined:
Class templates | Specify how individual classes can be constructed. |
Function templates | Specify how individual functions can be constructed. |
Regardless of the type of template being used, the code is essentially split into three parts:
Template declaration | This is the part of the source code that declares the template class or function. It does not necessarily contain the definition of the class or function, although it may optionally do so. For example, a template declaration may describe a Stack template ... |
Get Developing and Porting C and C++ Applications on AIX 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.