Controls the placement and linkage of template instances.
a must be one of the following:
Value of a |
Meaning |
---|---|
extern |
Places all needed instances into the template repository and gives them global linkage. (If an instance in the repository is out of date, it is reinstantiated.) |
explicit |
Places explicitly instantiated instances into the current object file and gives them global linkage. Does not generate any other needed instances. |
global |
Places all needed instances into the current object file and gives them global linkage. |
semiexplicit |
Places explicitly instantiated instances into the current object file and gives them global linkage. Places all instances needed by the explicit instances into the current object file and gives them static linkage. Does not generate any other needed instances. |
static |
Places all needed instances into the current object file and gives them static linkage. |
If -instances is not specified, -instances=extern is assumed.
For all values other than extern, the template definitions must be included (directly or indirectly) within the current compilation unit. The compiler silently skips the instantiation if the definition is not available.