First of all I apologize for the long lead up to such a simplistic question.
I am implementing a class which serves as a very long 1 dimensional index on a space fil
You could perhaps add an "out of bounds" exception to the [] operator (or at least an assert).
This should catch any problems, especially when debugging.