Using Templates in C++ Programs

C++ language only
Templates may be used in C++ to declare and define a related set of:
  • Classes
  • Functions
  • Static data members of template classes
The C++ language describes the syntax and meaning of each kind of template. Each compiler determines the mechanism that controls when and how often a template is expanded.
See the ILE C/C++ Language Reference for more information. The "Templates" topic includes descriptions and examples of:
  • Template parameters
  • Template instantiations and specializations (both explicit and partial)
  • Static data members and templates
  • Class templates and function templates
  • Overloading function templates
  • Nested templates