Getting the current module as a symbol
Mithun Hunsur via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Apr 12 06:44:07 PDT 2016
Hi all,
I'm looking for the equivalent of `typeof(this)` in module scope
(so that it gets the current module). My use-case is iterating
over the members of the module - right now I'm doing
`mixin(iterateOverModule!(module.name.here));`
but in the interests of keeping the code simple to maintain, I'd
like to be able to get the current module automatically.
Is this possible? A cursory Google search didn't turn up
anything, and `this` has no meaning in module scope.
More information about the Digitalmars-d-learn
mailing list