fork download
  1.  
  2. template <const char *name> class Super
  3. {
  4. };
  5.  
  6. class Object : Super<"hello">, Super<"world">
  7. {
  8. };
  9.  
  10. int main()
  11. {
  12. return 0;
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6:29: error: ‘"hello"’ is not a valid template argument for type ‘const char*’ because string literals can never be used in this context
 class Object : Super<"hello">, Super<"world">
                             ^
prog.cpp:6:45: error: ‘"world"’ is not a valid template argument for type ‘const char*’ because string literals can never be used in this context
 class Object : Super<"hello">, Super<"world">
                                             ^
stdout
Standard output is empty