You can use these options to control how the C++ compiler handles templates.
| Option name | Equivalent pragma name | Description |
|---|---|---|
| -qtempinc (C++ only) | None. | Generates separate template include files for template functions and class declarations, and places these files in a directory which can be optionally specified. |
| -qtemplatedepth (C++ only) | None. | Specifies the maximum number of recursively instantiated template specializations that will be processed by the compiler. |
| -qtemplaterecompile (C++ only) | None. | Helps manage dependencies between compilation units that have been compiled using the -qtemplateregistry compiler option. |
| -qtemplateregistry (C++ only) | None. | Maintains records of all templates as they are encountered in the source and ensures that only one instantiation of each template is made. |
| -qtempmax (C++ only) | None. | Specifies the maximum number of template include files to be generated by the -qtempinc option for each header file. |
| -qtmplinst (C++ only) | None. | Manages the implicit instantiation of templates. |
| -qtmplparse (C++ only) | None. | Controls whether parsing and semantic checking are applied to template definitions. |
![]() |
None. | Suppresses the implicit instantiation of a template specialization or its members. |
| -qlanglvl=[no]gnu_externtemplate | None. | Suppresses the implicit instantiation of a template specialization or its members. This option is deprecated in XL C/C++ V11.1; you can use the option -qlanglvl=[no]externtemplate instead. |
![]() |
None. | Defines class or function templates that can have any number (including zero) of parameters. |