On 7/10/21 10:20 PM, someone wrote: > mixin template templateUGC ( > typeStringUTF, > alias lstrStructureID > ) { > > public struct lstrStructureID {
The only way that I know is to take a string parameter and use it with a string mixin:
mixin template templateUGC ( typeStringUTF, string lstrStructureID ) { mixin("public struct " ~ lstrStructureID ~ q{ { typeStringUTF whatever; } }); } mixin templateUGC!(string, "gudtUGC08"); mixin templateUGC!(dstring, "gudtUGC16"); mixin templateUGC!(wstring, "gudtUGC32"); void main() { gudtUGC32 something; } Ali