fork download
  1. enum class language { C };
  2.  
  3. constexpr language operator++(language l, int) { return language(int(l)+1); }
  4.  
  5. template <language L>
  6. class Lounge {};
  7.  
  8. int main() {
  9. Lounge<C++> room;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:9:12: error: 'C' was not declared in this scope
prog.cpp:9:13: error: an increment cannot appear in a constant-expression
prog.cpp:9:15: error: template argument 1 is invalid
prog.cpp:9:21: error: invalid type in declaration before ';' token
stdout
Standard output is empty