I want to generate a new symbol (new variable name) from existing one: e.g. in C:

$ cat t.c
--------------------------------------------
#define f(x) _##x

int main() {
  int f(x) = 3;
  return _x;
}

$ make t
cc     t.c   -o t
$ ./t
$ echo $?
3
--------------------------------------------

I wonder how to do this in D? using template / mixin? traits?

Can you show me an example?

Thanks.

Reply via email to