code like struct X(T){ alias T TT; } alias TypeTuple!(int,int, X!string) G; alias G[2].TT TT; // <-- parse failure doesn't work. It's just not built in to the D grammar. Of course, the workaround is simply alias G[2] G2; alias G2.TT TT;
*** Issue 5697 has been marked as a duplicate of this issue. ***
*** Issue 6740 has been marked as a duplicate of this issue. ***
Just pasting this here as I've ran into it again: template test(T, Preds...) { enum bool test = Preds[0]!T; // error: semicolon expected, not '!' } A workaround is to use an alias: template test(T, Preds...) { alias Pred = Preds[0]; enum bool test = Pred!T; }
I have just run into this. Has it been fixed in the newest DMD release?
supported since 2.068.2. --- import std.meta : AliasSeq; struct X(T) { alias T TT; } alias G = AliasSeq!(int,int, X!string); alias TT = G[2].TT; static assert (is(TT == string)) ---