September 18, 2016 Getting Data Members of an Aggregate | ||||
|---|---|---|---|---|
| ||||
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. | ||||
September 18, 2016 Re: Getting Data Members of an Aggregate | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | 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 | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply