ctfe and static arrays

Jay Norwood via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 24 10:35:38 PDT 2015


I'm a bit confused by the documentation of the ctfe limitations 
wrt static arrays due to these seemingly conflicting statements, 
and the examples didn't seem to clear anything up.  I was 
wondering if anyone has examples of clever things that might be 
done with static arrays and pointers using ctfe.

2.Executed expressions may not reference any global or local 
static variables.

C-style semantics on pointer arithmetic are strictly enforced. 
Pointer arithmetic is permitted only on pointers which point to 
static or dynamic array elements.



More information about the Digitalmars-d-learn mailing list