Is it possible to use tokens as template parameters?

rempas rempas at tutanota.com
Sat Aug 14 11:23:12 UTC 2021


Is it possible to do something like that?

```
mixin template lel(alias N, alias V) {
   auto N = V;
}

void main() {
   mixin lel!(name, "Hmmmm");
}
```

In this case, it would (if it was possible) get replaced with: 
`auto name = "Hmmmm";`
Is there something I'm missing?


More information about the Digitalmars-d mailing list