Minor nitpick: probably better to explicit write `private size_t index=0;` to make code clearer, even though `.init` is 0.