#pragma define, #pragma instantiate (C++ only)

Category

Template control

Purpose

Provides an alternative method for explicitly instantiating a template class.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-#--pragma--+-define------+--(--template_class_name--)-------><
              '-instantiate-'                              

Parameters

template_class_name
The name of the template class to be instantiated.

Usage

This pragma provides the equivalent functionality to C++ explicit instantiation definitions. It is provided for compatibility with earlier releases only. New applications should use C++ explicit instantiation definitions.

This pragma can appear anywhere an explicit instantiation definition can appear.

Examples

The following directive:
#pragma define(Array<char>)
is equivalent to the following explicit instantiation:
template class Array<char>;

Related information