On 8/3/12, Zhenya <[email protected]> wrote: > snip You mean how to extract the variable name?
import std.stdio;
template T(alias a)
{
enum string T = __traits(identifier, a);
}
void main(string[] argv)
{
char f = 'a';
writeln(T!f); // writes 'f'
}
