fork download
  1. #define GEN(Fun, Ret, Arg1, Arg2, TemplateArgs) \
  2. template<TemplateArgs> \
  3. Ret Fun(Arg1, Arg2) \
  4. { \
  5. return Ret(); \
  6. }
  7.  
  8. #define Id2(x, y) x, y
  9.  
  10. GEN(f, int, T, T, typename T);
  11. GEN(g, int, T, U, Id2(typename T, typename U));
  12.  
  13. int main()
  14. {
  15. f(5, 7);
  16. g(5, 7.);
  17. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Standard output is empty