compile time output

Trass3r mrmocool at gmx.de
Tue Jan 20 07:36:09 PST 2009


Is there any way to output information at compile time other than 
pragma(msg?
pragma is driving me crazy, the following doesn't work:

auto members = __traits(allMembers, typeof(this));
foreach(m; members)
{
	pragma(msg, m);
}

-> Error: string expected for message, not 'm'

Though the docs clearly state:
allMembers: "An array of string literals is returned"
Also checked that, m is of type invariant(char)[].


Any ideas? -.-


More information about the Digitalmars-d-learn mailing list