newCTFE Status August 2017
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 11 02:27:47 PDT 2017
On Tuesday, 1 August 2017 at 21:27:32 UTC, Stefan Koch wrote:
> [ ... ]
Hey guys,
I just finished &&.
The following test works now:
int[2] aaa2(bool b1, bool b2, bool b3, bool b4)
{
int x = 0;
if (b1 && ++x && b2 && x++ && b3 && (b4 || x++))
{
return [x, 1];
}
else
{
return [x, 0];
}
}
static assert(aaa2(0, 0, 0, 0) == [0, 0]);
static assert(aaa2(0, 1, 0, 0) == [0, 0]);
static assert(aaa2(0, 0, 1, 0) == [0, 0]);
static assert(aaa2(1, 0, 1, 0) == [1, 0]);
static assert(aaa2(1, 1, 1, 0) == [3, 1]);
static assert(aaa2(1, 1, 1, 1) == [2, 1]);
After a year of development we are finally able to keep all the
side effects :)
Whoohoo!
Cheerful,
Stefan
More information about the Digitalmars-d
mailing list