Chapter 2. Programming with Templates

Table of Contents
2.1. Templates Execute at Compile-Time
2.2. Template Programming for POOMA Users
2.3. Template Programming Used to Write POOMA

POOMA extensively uses C++ templates to support type polymorphism without incurring any run-time cost. In this chapter, we briefly introduce using templates in C++ programs by relating them to "ordinary" C++ constructs such as values, objects, and classes. The two main concepts underlying C++ templates will occur repeatedly:

For those interested in the implementation of POOMA, we close the section with a discussion of some template programming concepts used in the implementation but not likely to be used by POOMA users.