<div>Greetings</div><div><br></div><div>Somebody please help me understand why we need the Tuple template in the following code. Does not __traits(getAttributes, foo.a) return a tuple? So what is the Tuple template doing here? Converting a tuple to a tuple?</div>

<div><br></div><div>Also where to learn more about tuples in D. Info in TDPL is sketchy.</div><div><br></div><div>Regards</div><div>- Puneet</div><div><br></div><div>template Tuple(T...) {</div><div>  alias T Tuple;</div>

<div>}</div><div><br></div><div>enum Bar;</div><div>class Foo {</div><div>  @Bar int a;</div><div>}</div><div><br></div><div>void main()</div><div>{</div><div>  Foo foo = new Foo;</div><div>  alias Tuple!(__traits(getAttributes, foo.a)) tp;</div>

<div>  pragma(msg, tp);</div><div>}</div><div><br></div>