CTFE attribute

Robert Clipsham robert at octarineparrot.com
Sat Jan 28 07:24:19 PST 2012


On 28/01/2012 15:13, Manu wrote:
> Sweet, I'll do that for now.
> You mean static if() right?

No, I mean if().

__ctfe is a magic variable, and during CTFE it is true, at run time it 
is false. As it is a variable and not a constant, it cannot be read at 
compile time, so static if() won't work.

See also:
http://dlang.org/function ctrl+f for __ctfe

-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list