Damn tab.<br><br><div class="gmail_quote">On Sun, Dec 23, 2012 at 6:48 PM, Philippe Sigaud <span dir="ltr"><<a href="mailto:philippe.sigaud@gmail.com" target="_blank">philippe.sigaud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div>Kenji Hara: </div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div>T.tupleof generates a tuple of field *symbols*.</div></div></div></div></blockquote></div></div></blockquote><div><br></div><div><br></div><div><div>struct S</div><div>{</div><div>    int a,b,c;</div><div>}</div><div>
<br></div><div>void main()</div><div>{</div><div>    writeln(S.tupleof); // Error! Type S is not an expression.</div><div>}</div></div><div><br></div><div>Which is why I didn't get the OP code.</div><div><br></div><div>
But this works:</div><div><div><br></div><div>void main()</div><div>{</div><div>    writeln(typeof(S.tupleof).stringof); // (int,int,int)</div><div>}</div></div><div><br></div><div>That's... disturbing, or maybe I'm too tired to think straight, but why is it NOK for the former version and OK for the latter?</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra"><div class="gmail_quote"><div>Getting type from a tuple of symbols returns a tuple of types in D.</div></div></div></div></blockquote></div></div></blockquote><div><br></div><div>That seems reasonable.</div>
<div><br></div></div>