On 8/10/12, Dmitry Olshansky <dmitry.o...@gmail.com> wrote: > Internally identical to: > > int opIndex(size_t idx) > { > return [integers][idx]; > } > > Allocates on every call or not? I've no idea maybe Kenji fixed this > already.
t's easy to check, add "writeln(&ints[idx]);" in opIndex and index [0] several times. If the addresses change it means it allocates. It does allocate every time when it's an enum but not if it's static.