Access maximum template depth at compile?

匿名 (未验证) 提交于 2019-12-03 00:59:01

问题:

In a certain compilation I need to play around with the option -ftemplate-depth=N that specifies the maximum template recursion.

Is it possible to access the value of the maximum template depth from the program?

I am interested in gcc or clang.

$ c++ -ftemplate-depth=128 main.cpp

#include<iostream> int main(){   std::cout << MAX_TEMPLATE_RECURSION << std::endl; // hypothetical name } 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!