fork(12) download
  1. template<unsigned int n>
  2. struct Factorial {
  3. enum { value = n * Factorial<n-1>::value};
  4. };
  5.  
  6. template<>
  7. struct Factorial<0> {
  8. enum {value = 1};
  9. };
  10.  
  11.  
  12. template<int x> struct _;
  13. int main() {
  14. _<Factorial<10>::value> __;
  15. return 0;
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:14:32: error: aggregate ‘_<3628800> __’ has incomplete type and cannot be defined
        _<Factorial<10>::value> __;
                                ^
stdout
Standard output is empty