Usability of "allMembers and derivedMembers traits now only return visible symbols"

Johan Engelen via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 7 08:08:17 PDT 2016


On Sunday, 4 September 2016 at 12:36:43 UTC, Andrei Alexandrescu 
wrote:
>
> Yah, .tupleof is great to have. I think that should be enough 
> for most introspection needs. Only the field names are missing, 
> can those be accessed somehow? -- Andrei

Note that the spec tells us:
"The .tupleof property returns an ExpressionTuple of all the 
fields in the class, __excluding__ the hidden fields and __the 
fields in the base class__." (emphasis mine)
So then you have to do __traits(parent, ) recursively...?



More information about the Digitalmars-d mailing list