digitalmars.D.learn - incomplete mixin expression
- Andrey (8/27) Apr 24 2019 Output:
- Adam D. Ruppe (3/5) Apr 24 2019 the inner ; is inappropriate there
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"?
Apr 24 2019
On Wednesday, 24 April 2019 at 17:22:42 UTC, Andrey wrote:the inner ; is inappropriate there fixing that might helpalias Qwerty = Alias!(mixin("AliasSeq!(" ~ args ~ ");")); }
Apr 24 2019








Adam D. Ruppe <destructionator gmail.com>