how to assign tuple named Tuple easily

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Mar 12 17:23:36 PDT 2017


On 03/13/2017 01:02 AM, Inquie wrote:
> Ok, it doesn't work for appending though ;)
[...]
> Tuple!(int, "A", double, "B")[] y;
> y ~= tuple(3, 2.5);

Interestingly, this works:

     Tuple!(int, "A", double, "B")[] y;
     y.length += 1;
     y[$ - 1] = tuple(3, 2.5);


More information about the Digitalmars-d-learn mailing list