1// { dg-do compile } 2// { dg-options "-ftemplate-depth-15" } 3template<unsigned int nFactor> 4struct Factorial 5{ 6 enum { nValue = nFactor * Factorial<nFactor - 1>::nValue }; // { dg-error "depth" } 7}; 8 9template<> 10struct Factorial<0> 11{ 12 enum { nValue = 1 }; 13}; 14 15static const unsigned int FACTOR = 20; 16 17int main() 18{ 19 Factorial<FACTOR>::nValue; // { dg-message "from here" } 20 return 0; 21} 22 23// { dg-prune-output "compilation terminated" } 24