Reflection to detect public/private/etc?
Adam D. Ruppe
destructionator at gmail.com
Fri Aug 12 13:37:45 PDT 2011
There's no way I've found, aside from direct access (so not via
getMembers) and seeing it it fails to compile.
I started hacking my compiler to add a traits(protection), but
while I got it working on direct symbols, it didn't work on the
stuff returned by __traits(getMember) so it didn't work for me...
it looks like in the compiler, the protection is applied only to
the name, not the stuff it points to.
I really want to get this figured out though so I can drop the
leading underscore from some web.d names...
More information about the Digitalmars-d-learn
mailing list