fork(3) download
  1. template <typename A, typename B>
  2. struct Type { A a; B b; };
  3.  
  4. #define macro(T,x) T x
  5.  
  6. int main() {
  7. macro(Type<int,float>,var);
  8. var.a = 7;
  9. return 0;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:7:27: error: macro "macro" passed 3 arguments, but takes just 2
  macro(Type<int,float>,var);
                           ^
prog.cpp: In function ‘int main()’:
prog.cpp:7:2: error: ‘macro’ was not declared in this scope
  macro(Type<int,float>,var);
  ^~~~~
prog.cpp:8:2: error: ‘var’ was not declared in this scope
  var.a = 7;
  ^~~
stdout
Standard output is empty