On Monday, 15 June 2020 at 13:34:18 UTC, Max Samukha wrote:
On Sunday, 14 June 2020 at 23:30:03 UTC, Andrei Alexandrescu
wrote:
It's really easy if members in the layout are given internal
names that include information about the original index.
You can construct a list of member aliases in the original
order and then 'alias this' that:
typeof(t[0]) works fine, but reading or assigning to such a field
will not work. For example:
void main() {
Tuple!(byte, int, short) t;
writeln(t[0]);
}
test.d(57,23): Error: need `this` for `__value_field_2` of type
`byte`