DMD 1.019 and 2.003 releases

Walter Bright newshound1 at digitalmars.com
Sun Jul 22 20:42:34 PDT 2007


Jarrett Billingsley wrote:
> A question -- many of the descriptions of the __traits functions say that 
> "an array is returned."  But some of the samples look like tuples are being 
> used:
> 
> alias typeof(__traits(getVirtualFunctions, D, "foo")) b;
> foreach (t; b)
>     writefln(typeid(t));
> 
> If this really did return an array, the typeof() it would be a single item, 
> not a list, and you wouldn't be able to foreach over it.  So does this 
> return a tuple instead? 

getVirtualFunctions returns a tuple of expressions.



More information about the Digitalmars-d-announce mailing list