CTFE attribute

Daniel Murphy yebblies at nospamgmail.com
Sat Jan 28 07:38:35 PST 2012


"Mehrdad" <wfunction at hotmail.com> wrote in message 
news:jg1469$4a6$1 at digitalmars.com...
>>
> Why isn't it a constant? o.O

It isn't a compile-time constant, it is constant.

You need to use if, not static if, because code versioned out with static if 
does not get processed in the compiler beyond parsing.  It needs to be done 
with a normal code branch that is always taken when in the interpreter but 
never taken at runtime. 




More information about the Digitalmars-d mailing list