get struct member names

Charles Cooper via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 14 07:47:59 PDT 2015


Hi all,
I am new to D and so far it is really great.

I am wondering how to get the names of member variables in a 
struct or class. I haven't worked it out yet but this would 
enable metaprogramming like iterating over the members of the 
struct.

I see in std.traits that you can get get MemberFunctionsTuple but 
nothing like MemberVariablesTuple.

Charles


More information about the Digitalmars-d-learn mailing list