CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 25 03:27:07 PST 2016


> static immutable alr = arrayLiteralReturn();
> static assert(alr == [1,2,3]);

There were a few problems with that.
Namely some arrays-literals would not have a length.
This is because of literals coercing to slices.
This bug is now fixed, at the expense of registering more types 
then is strictly necessary.
Also it creates null holes in the TypeArrays.
This may might be painful in the future.
But for now, global Array-literals work.



More information about the Digitalmars-d mailing list