Challenge
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 3 19:30:10 PDT 2016
On Tuesday, October 04, 2016 11:13:36 Manu via Digitalmars-d wrote:
> I'm feeling John's solution is a little bit simpler. But nice work, thanks!
So, it is. LOL. I'd actually glanced over that post while I was in the
middle of getting my version to work, and I read it too quickly, because I
understood that it had just solved the property problem and that it didn't
work for all cases. I'll have to update my PR. Though his code does make the
mistake of doing
mixin(`alias mem = T.` ~ member ~ `;`);
rather than doing something like
alias mem = AliasSeq!(__traits(getMember, T, member))[0];
which means that there are some cases where it won't work properly. The core
logic is simpler though, which is definitely a plus.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list