can't I use __traits(allMembers) recursivly ?
Tobias Pankrath
tobias at pankrath.net
Fri Jan 24 01:17:28 PST 2014
On Friday, 24 January 2014 at 09:14:31 UTC, Tobias Pankrath wrote:
> On Friday, 24 January 2014 at 06:11:30 UTC, Uplink_Coder wrote:
>> I'm trying to serialize my struct through CT-Refelction
>
> Maybe your _pod_ functions needs a parameter.
> // take a look at std.conv.to
>
> string toString(P)(P pod)
> {
>
>
> }
Oops, that was not finished. __traits(getMember, pod, member)
could now be used. But you'll need to check if member really is a
field. So it's easier to iterate over std.traits.FieldTypeTuple
directly.
More information about the Digitalmars-d-learn
mailing list