Access maximum template depth at compile time?

Viewed 972

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
}
0 Answers
Related