T[#] can be a type or an array of types
Koroskin Denis
2korden at gmail.com
Thu Jun 5 03:01:19 PDT 2008
Your example was somewhat a bit compilated and not clear, I tried to
simplify and analyze it (to get a better knowledge of the problem to
myself and others). That was my point of the post.
Back to the topic, you could submit a bug report, if you feel that it's
not the way it should be in D.
ValueTuple!(int, uint, char)[2] currently gives char
Tuple!(int, uint, char)[2] currently gives a static array of Tuple!(int,
uint, char)
This inconsistancy could be fixed by treating ValueTuple!(int, uint,
char)[2] as an static array of ValueTuples, I don't see any problem here.
Type of third value in a ValueTuple can be access in other (more generic)
way:
ValueTuple!(int, uint, char) x;
alias typeof(x[2]) Type; // works for both Tuple and ValueTuple
More information about the Digitalmars-d-bugs
mailing list