Template instantiation (C++ only)

The act of creating a new definition of a function, class, or member of a class from a template declaration and one or more template arguments is called template instantiation. The definition created from a template instantiation to handle a specific set of template arguments is called a specialization.

IBM extension

A forward declaration of a template instantiation has the form of an explicit template instantiation preceded by the extern keyword.

End of IBM extension

Read syntax diagramSkip visual syntax diagramTemplate instantiation declaration syntax
 
>>-extern--template--template_declaration----------------------><
 

The language feature is an orthogonal extension to Standard C++ for compatibility with GNU C++, and is described further in Explicit instantiation (C++ only).

Related information