On Sunday, 9 December 2012 at 10:42:40 UTC, js.mdnq wrote:
How can I create mixes of stringified code and code itself?
[...]
mixin template GenStruct(stringname) { struct stringname ~ "alpha" { .... } }mixin GenStruct!("Helpme"); would be equivalent to do the following struct Helpmealpha { .... }
In this particular case you can do this: mixin template GenStruct(string stringname) { struct S { .... } mixin("alias S " ~ stringname ~ "alpha;"); }