Compile-Time module info
Chris NS
ibisbasenji at gmail.com
Sun Jul 22 00:31:47 PDT 2012
Is there any means to get meaningful moduleinfo at compile time,
specifically a list of the local classes of a given module?
__traits(allMembers, mod) doesn't work: "inverse.d(109): Error:
import data has no members".
I was hoping that something along these lines would be possible
in CTFE:
foreach ( decl ; __traits( allMembers, data ) ) {
if ( is( typeof( mixin( decl ) ) == class )
&& !__traits( isAbstractclass, mixin( decl ) ) ) {
// ...some code in here...
}
}
-- Chris NS
More information about the Digitalmars-d-learn
mailing list