Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/template/recurse.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
// Test for handling of excessive template recursion. // { dg-options "-ftemplate-depth-50 -O" } template <int I> struct F { int operator()() { F<I+1> f; // { dg-error "depth" } return f()*I; } }; template <> struct F<52> { int operator()() { return 0; } }; int main () { F<1> f; return f(); // { dg-message "from here" } } // { dg-prune-output "compilation terminated" }