newCTFE Status August 2017

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 5 10:08:18 PDT 2017


On Tuesday, 1 August 2017 at 21:27:32 UTC, Stefan Koch wrote:
> [ ... ]

After a surprisingly small amount of work we are now supporting 
pointers to array-items.
It should be quite doable to add bounds-checked pointer with 
minimal amount of work.
(Note this is only for 1D arrays/Slices ... Mulidimensional 
Arrays/Slices still have issues preventing that)

The following video shows what needed to happen:
https://www.youtube.com/watch?v=QHwIEd8E5mE

example code that now works:

int* getAPtr(int[] arr)
{
   // assert(a.length > 1);
   return &arr[1];
}

static assert(getAPtr([1, 2, 3]) == 2);


More information about the Digitalmars-d mailing list