enum Qaz : wstring
{
    One = "один"
}

template Qwerty(Values...)
{
    enum text = "Values[%d]";
enum args = iota(Values.length).map!(value => format!text(value)).join(',');

    pragma(msg, args);

    alias Qwerty = Alias!(mixin("AliasSeq!(" ~ args ~ ");"));
}

void main()
{
    Qwerty!(10, Qaz.One, "qwerty").writeln;
}

Output:
Values[0],Values[1],Values[2]
onlineapp.d(44): Error: incomplete mixin expression AliasSeq!(Values[0],Values[1],Values[2]); onlineapp.d(54): Error: template instance `onlineapp.toUnderlyingType!(10, "\x3e\x04\x34\x04\x38\x04\x3d\x04", "qwerty")` error instantiating

Why mixin is "incomplete"?

Reply via email to