Getting Data Members of an Aggregate
Jonathan M Davis via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 18 15:00:44 PDT 2016
On Sunday, September 18, 2016 21:49:58 Nordlöw via Digitalmars-d-learn wrote:
> How do I extract only the *data* members of an aggregate type `T`.
>
> Simpliy `__traits(allMembers, T)` is not enough since it all
> returns function, type and alias members along side the data
> members.
>
> I need this when serializing an instance of the element type to
> be inserted into a radix tree container.
T.tupleof
https://dlang.org/spec/struct.html#struct_properties
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list