Loading...
Select Version
&pagelevel(4)&pagelevel
#pragma
instantiate_mangled_id
external-link-name
This pragma triggers the instantiation of the named entity in the current translation unit. The entity will be named with its external link name, which is a mangled name. For an example: the template function template <class T> void foo(T t);
instantiated with int
could be named with #pragma instantiate_mangled_id __1foo__tm__2_i__FZ1Z_v&_
.
The pragma can be placed anywhere in the source file. It will be evaluated at the end of the source file when all templates and their uses have been seen. In some situations, the pragma will have no effect. In this case a warning will be issued. Possible causes are:
- wrong syntax, the argument of the pragma is no valid external name
- the argument does not name a template instance (or extern inline instance)
- the instance was not used in this translation unit
- the instance cannot be generated in this translation unit (missing definition of the template or one of its arguments)
This pragma is available in C/C++ version 4.0B04 or later.