List all enum in a class

Adam D. Ruppe destructionator at gmail.com
Thu Jun 13 10:15:53 PDT 2013


On Thursday, 13 June 2013 at 12:46:49 UTC, bearophile wrote:
> Is it worth asking a D enhancement?

I don't think so because it isn't something you'd even really 
need to know, it is just like writing a literal.

Actually that gives me an idea: if you have a variable that is 
not a function and obviously not a literal since they wouldn't 
appear on allMembers, checking if you can take the address of it 
might be a usable check. A regular immutable member and an enum 
differ in that the member has an address. The enum doesn't.

So perhaps there is a way to figure it out, but I still don't 
think it is worth an enhancement for anyway.


More information about the Digitalmars-d-learn mailing list