__traits(allMembers) and aliases

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 25 05:06:05 PDT 2015


Is there a way to determine whether a given symbol is an alias? 
Consider this:

```
module funcs;
alias FuncPtr = void function();
@ChooseMe FuncPtr funcPtr;
alias anotherName = funcPtr;
```

Handing this module off to __traits(allMembers), then checking 
for the UDA on each member, I can filter out FuncPtr just fine. 
Unfortunately, anotherName passes the test, but I don't want it 
to. Is there anyway I can distinguish the anotherName alias from 
funcPtr without tagging it with a UDA? I can't find any sort of 
isAlias trait anywhere.


More information about the Digitalmars-d-learn mailing list