Description
The #pragma define directive forces the definition of a template class without actually defining an object of the class. This pragma is only provided for backward compatibility purposes. The user can explicitly instantiate a class, function or member template specialization by using a construct of the form:
template declaration
For example:
#pragma define(Array<char>)
is equivalent to:
template class Array<char>;
This pragma must be defined in global scope (i.e. it cannot be enclosed inside a function/class body).
Syntax
where the template_classname is the name of the template to be defined.
The pragma can only appear in the global scope. It is used when organizing your program for the efficient or automatic generation of template functions.
![]()
Preprocessor Directives - An
Overview
Preprocessor Directive -
#pragma
