mixin template's alias parameter ... ignored ?
someone
someone at somewhere.com
Sun Jul 11 05:20:49 UTC 2021
```d
mixin template templateUGC (
typeStringUTF,
alias lstrStructureID
) {
public struct lstrStructureID {
typeStringUTF whatever;
}
}
mixin templateUGC!(string, "gudtUGC08");
mixin templateUGC!(dstring, "gudtUGC16");
mixin templateUGC!(wstring, "gudtUGC32");
void main() {
gudtUGC32 something; /// Error: undefined identifier
`gudtUGC32`
}
```
I cannot manage to get this right; not even with:
```d
public struct mixin(lstrStructureID) { ... }
```
because the argument seems to require a complete statement.
More information about the Digitalmars-d-learn
mailing list