-qtempinc(仅限 C++)
适用的调用
选项 | xlc (编译 C) | xlC (编译 C++) | xlclang(编译 C) | xlclang++(编译 C++) |
---|---|---|---|---|
-qtempinc | ✓ |
注: 此表中仅列出典型调用。 对于所有基本调用及其等效特殊调用,您可以参阅 编译器调用的完整列表 。
类别
等效编译指示
无。
用途
为模板函数和类声明生成单独的模板包含文件,并将这些文件放置在选择性指定的目录中。
语法
缺省值
-qnotempinc
参数
- directory_path
- 要将生成的模板包含文件放置在其中的目录。
使用量
-qtempinc 和 -qtemplateregistry 编译器选项互斥。 指定 -qtempinc 意味着 -qnotemplateregistry。 同样,指定 -qtemplateregistry 意味着 -qnotempinc。 但是,指定 -qnotempinc 并不意味着 -qtemplateregistry。
指定 -qtempinc 或 -qtemplateregistry 意味着 -qtmplinst=auto。
预定义的宏
当 -qtempinc 生效时, __TEMPINC__ 预定义为 1; 否则,未对其进行定义。
示例
要编译文件
myprogram.C
并将为模板函数生成的包含文件放在 /tmp/mytemplates
目录中,请输入: xlc++ myprogram.C -qtempinc=/tmp/mytemplates