Statically-Sized Array of ElementType E indexed by I. TODO: assert that I is continuous if it is a enum.
enum N = 7; enum I { x = 0, y = 1, z = 2} alias E = int; alias A = IndexedArray!(E, I); static assert(A.sizeof == 3*int.sizeof); A x; x[I.x] = 1; x[I.y] = 2; x[I.z] = 3; static assert(!__traits(compiles, { x[1] = 3; })); // no integer indexing
See Implementation
Statically-Sized Array of ElementType E indexed by I. TODO: assert that I is continuous if it is a enum.