[phobos] phobos commit, revision 2018
Philippe Sigaud
philippe.sigaud at gmail.com
Sat Sep 18 02:37:53 PDT 2010
On Sat, Sep 18, 2010 at 00:58, Simen Kjaeraas <simen.kjaras at gmail.com>wrote:
> Andrei Alexandrescu <andrei at erdani.com> wrote:
>
> Yes yes yes! I am so happy bug 2800 was fixed. This is a huge step towards
>> legitimizing Tuple. I cringed whenever I had to write t.field[0] instead of
>> the natural t[0].
>>
>> BTW: a large part of the motivation for "alias this" was allowing this
>> very idiom. True story!
>>
>
> I don't really post here, but this is too awesome. Finally!
>
Yeaaaahhhhh!!!
Oh, that's good news indeed. (and an errata less for TDPL). I just tested a
Tuple-equivalent in DMD 2.049 and it works OK.
Oh, and I see that
auto t = tuple();
now works. That's good! It's a common degenerate case with variadic
templates, and Tuple!() is a good unit type (ie: a type with only one value,
namely tuple() / Tuple!()() )
I just tested alias someTuple this with a function call and it doesn't work.
Oh well, that's for another time.
int foo(int i, double d, string s) { return 0;}
auto t = tuple(1, 3.1415, "abc");
auto r = foo(t); // doesn't work.
Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100918/4bc0a0b2/attachment.html>
More information about the phobos
mailing list