Battle-plan for CTFE

Stefan Koch via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Oct 30 14:09:19 PDT 2016


On Sunday, 30 October 2016 at 03:07:13 UTC, Stefan Koch wrote:
> I just made progress on another fundamental feature,
> function call support.
>
> It's does not [fully] work yet, but it shows promise.

The following just compiled :
int fn(int a)
{
     return a + fn2(2);
}


int fn2(int a)
{
     return a + 2;
}

static assert(fn2(4) == 6);
static assert(fn(4) == 8);
static assert(fn(fn(2)) == 10);




More information about the Digitalmars-d-announce mailing list