Introspecting a Module with Traits, allMembers
Dicebot via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jul 9 14:42:20 PDT 2014
On Wednesday, 9 July 2014 at 20:52:29 UTC, Maxime
Chevalier-Boisvert wrote:
> It's a bit of a hack, but it works. Is there any way to create
> some sort of alias for __traits(getMember, ir.ops, memberName)
> so that I don't have to write it out in full twice? Made some
> attempts but only got the compiler to complain.
alias Alias(alias Sym) = Sym;
alias member = Alias!(__traits(getMember, ir.ops, memberName);
It does not work with normal alias because of grammar limitation
afaik.
More information about the Digitalmars-d-learn
mailing list