template

From Appmethod Topics
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Category

C++ Specific Keywords

Syntax

template-declaration:templateclass
   template < template-argument-list > declaration
template-argument-list:
   template-argument
   template-argument-list, template argument
template-argument:
   type-argument
   argument-declaration
type-argument:
   class typename identifier
template-class-name:
   template-name < template-arg-list >
template-arg-list:
   template-arg
   template-arg-list , template-arg
template-arg:
   expression
   type-name
< template-argument-list > declaration

Description

Use templates (also called generics or parameterized types) to construct a family of related functions or classes.