Phobos Members-Tuple function?
F i L
witte2008 at gmail.com
Sat Jan 19 12:57:51 PST 2013
bearophile wrote:
> I have not fully understood the problem, but have you tried
> [__traits(getAttributes, m)] ?
yes, that's not really relevant to my problem. 'm' in your
example, can't be read at compile time, because
__traits(derivedMembers, ..) returns a Tuple of strings, not
Symbols. I can get the attributes of a specific member just fine,
the problem is iterating over *all* members, then finding the
attributes for each member.
It's relatively easy to solve with recursion, I'm just trying to
cover my tracks here and see if there's a better way I'm unaware
of.
More information about the Digitalmars-d-learn
mailing list