How to tell an identifier is a module?

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 26 05:25:58 PST 2015


__traits(allMembers, mixin(__MODULE__)) also yields a module name 
like object, but then how can you find out that "object" is a 
module?

This doesn't work:

void main() {
     pragma(msg, is(int == int));
     pragma(msg, is(object == module));
}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list