Consider a simple macro:
#define ECHO(x) x ECHO(foo(1, 2))
This produces the exact output we expect:
foo(1, 2)
A variadic macro may help:
#define ECHO(x...) x ECHO(foo(1, 2)) ECHO(template)