fork download
  1.  
  2. template <const char *name> class Super
  3. {
  4. };
  5.  
  6. const char *hello = "hello";
  7. const char *world = "world";
  8.  
  9. class Object : Super<hello>, Super<world>
  10. {
  11. };
  12.  
  13. int main()
  14. {
  15. return 0;
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:9:27: error: ‘hello’ is not a valid template argument because ‘hello’ is a variable, not the address of a variable
 class Object : Super<hello>, Super<world>
                           ^
prog.cpp:9:41: error: ‘world’ is not a valid template argument because ‘world’ is a variable, not the address of a variable
 class Object : Super<hello>, Super<world>
                                         ^
stdout
Standard output is empty