Using traits get a list of methods and filter out the member vars.

Dicebot public at dicebot.lv
Sun Sep 8 14:07:09 PDT 2013


On Sunday, 8 September 2013 at 19:48:31 UTC, Jacob Carlborg wrote:
> I'm wondering if it tries to call the method here:
>
> static if (is(typeof(member) == function))
>
> Since D allows to call methods without parentheses.

No, not in typeof. It will try to call it with `member.stringof` 
though, thus for functions usage of __traits(identifier) is 
necessary.


More information about the Digitalmars-d-learn mailing list