[Issue 14900] 2.068.0 change log example does not compile
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 10 09:03:51 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14900
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
OH MY GOD! The example code does not work even on master!
When I wrote the example code, I did tested it something like.
alias TypeTuple(T...) = T;
struct S
{
alias T = int;
alias U = TypeTuple!(long, string);
}
alias Types = TypeTuple!(S, S);
struct X(Types...) // used tuple parameter
{
Types[0].T a; // Types[0] == S, then typeof(a) == S.T == int
Types[0].U[1] b; // Types[0].U == S.U, then typeof(b) == S.U[1] == string
}
alias x = X!Types;
After that, I rewrote the example code to current style WITHOUT testing!
Finally, unworkable example code is shown in changelog...
--
More information about the Digitalmars-d-bugs
mailing list