array[Succ!(Index.A)] = t;
auto i = Index.A;
array[i.succ] = t;

And with "enum precondition" in the succ() function you can do both cases with a single function:

array[Index.A.succ] = t;
auto i = Index.A;
array[i.succ] = t;

Bye,
bearophile

Reply via email to