www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Constants doesn't have UDA's?

reply "Temtaime" <temtaime gmail.com> writes:
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.
Jun 09 2013
parent reply "Jack Applegame" <japplegame gmail.com> writes:
http://forum.dlang.org/thread/htuakrtvoyymappjewps forum.dlang.org
Jun 10 2013
parent "Temtaime" <temtaime gmail.com> writes:
Oh, i see, thanks.

P.S. туй васю нигодяй.
Jun 10 2013