On Saturday, 9 July 2016 at 21:12:24 UTC, WhatMeWorry wrote:
foreach( i, str; myClassMembers)

What are you doing to get myClassMembers?

If it is __traits(allMembers), it just gives you the *names* of the members. To get the actual thing, you then do __traits(getMember, object, str) and can check the type of that.

Also, is there a way to get __traits(allMembers to work recursively? Say, with struct containing structs.

You can always just call it recursively once you get the member :)

Reply via email to