static foreach(sym; getSymbolsByUDA!(A, Attr)){
writeln(sym.stringof); // print variable name "a" this what i
want
}
foreach(sym; getSymbolsByUDA!(A, Attr)){
writeln(sym.stringof); // print "sym"
}
foreach(sym; getSymbolsByUDA!(A, Attr)){
writeln(__traits(identifier, sym)); //also print "sym"
}
is there a way to get variable name using foreach like static
foreach?
