【问题标题】:Visual C++ - Set the depth of template instantiationVisual C++ - 设置模板实例化的深度
【发布时间】:2014-06-16 00:50:00
【问题描述】:

使用 Visual Studio 编译器进行编译时可以更改模板实例化的深度吗?

我需要一个等效的 gcc

-ftemplate-depth = Num

【问题讨论】:

  • 你到底想做什么?你真的有嵌套超过 17 个(C++11 之前)或 1024 个(C++11 以后)级别的模板吗?
  • 只是问它是否可以调整
  • 一个小备注:Visual C++ compiler limits.
  • 还有一个:Visual C++ compiler options。与模板无关。
  • 您可以尝试更改您的(元?)程序逻辑以保持在编译器限制范围内。

标签: c++ templates visual-c++


【解决方案1】:

【讨论】:

  • 你怎么知道模板递归是固定在 2048 的?是固定为2046的模板参数计数?
猜你喜欢
  • 2019-02-11
  • 1970-01-01
  • 2014-05-13
  • 1970-01-01
  • 2019-07-27
  • 2013-10-31
  • 1970-01-01
  • 1970-01-01
  • 2012-03-18
相关资源
最近更新 更多