fork download
  1. template<class T, const char* p> struct X {
  2. };
  3. const char p[] = "Vivisectionist";
  4. int main() {X<int,p> x;}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:4: error: ‘p’ cannot appear in a constant-expression
prog.cpp:4: error: template argument 2 is invalid
prog.cpp:4: error: invalid type in declaration before ‘;’ token
prog.cpp:4: warning: unused variable ‘x’
stdout
Standard output is empty