traits for function having actual source declaration?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 1 10:26:11 PDT 2017


bitwise wrote:

> On Friday, 1 September 2017 at 14:38:38 UTC, bitwise wrote:
>> When I'm using __traits(allMembers), I get a all the invisible functions 
>> added by the compiler as well "__ctor", "__xdtor", "__cpctor", etc..
>>
>> Is there a way to filter them out?
>
> dlang's "Lexical" page says:
>
> "Identifiers starting with __ (two underscores) are reserved."
>
> So I suppose I could just filter out functions with leading underscores, 
> but still seems unreliable, as people may not listen.

they *should* listen. anyone who doesn't just aksing for troubles, and i 
see no reason to guard 'em further.


More information about the Digitalmars-d-learn mailing list