What the heck is wrong with CTFE's?

Dicebot public at dicebot.lv
Mon Jul 8 05:08:38 PDT 2013


On Monday, 8 July 2013 at 11:56:40 UTC, JS wrote:
> ...

CTFE has nothing to do with it.

void main()
{
         import std.stdio;
	int i = 0;	
	writeln(i == 0 ? i : i++);
	writeln(i);
}

"i++" is evaluated lazy here. I don't know if it is a bug or 
matches the spec.


More information about the Digitalmars-d mailing list