Constants doesn't have UDA's?
Temtaime
temtaime at gmail.com
Sun Jun 9 22:26:22 PDT 2013
Hello guys!
@("att") int t = 1;
auto b = [ __traits(getAttributes, t) ];
Works.
@("att") enum int t = 1;
auto b = [ __traits(getAttributes, t) ];
Works also.
@("att") const int t = 1;
auto b = [ __traits(getAttributes, t) ];
Doesn't work.
Error: first argument is not a symbol
Why?
Also a little another question can i detect if variable is static
or not?
Regards.
More information about the Digitalmars-d-learn
mailing list