<br><br><div class="gmail_quote">On Sat, Sep 18, 2010 at 00:58, Simen Kjaeraas <span dir="ltr"><<a href="mailto:simen.kjaras@gmail.com">simen.kjaras@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Andrei Alexandrescu <<a href="mailto:andrei@erdani.com" target="_blank">andrei@erdani.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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].<br>
<br>
BTW: a large part of the motivation for "alias this" was allowing this very idiom. True story!<br>
</blockquote>
<br></div>
I don't really post here, but this is too awesome. Finally!<br></blockquote><div><br><br>Yeaaaahhhhh!!!<br>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.<br>
<br>Oh, and I see that<br><br>auto t = tuple();<br><br>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!()() )<br>
<br><br>I just tested alias someTuple this with a function call and it doesn't work. Oh well, that's for another time.<br><br>int foo(int i, double d, string s) { return 0;}<br>
auto t = tuple(1, 3.1415, "abc");<br>auto r = foo(t); // doesn't work.<br><br><br><br>Philippe<br></div></div>