Battle-plan for CTFE

Stefan Koch via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Jul 17 03:12:55 PDT 2016


On Friday, 15 July 2016 at 20:36:46 UTC, Stefan Koch wrote:
> I decided to keep a gist updated to represent the current state 
> the new engine can handle.
> https://gist.github.com/UplinkCoder/89faa06311e417aa93ea99bc92934d3e

Internal changes to the bytecode engine make the manipulation of 
values on the ctfe stack possible.

this allows the following code to properly compile now.

struct V3 {int x; int y; int z;}
int fn() {

         auto b = V3(1,2,3);
         b.y += 19;
         return b.y;
}

static assert(fn() == 21);


More information about the Digitalmars-d-announce mailing list