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
Unless I'm drastically misunderstanding something,
return point[ index % dimensions ];
is not bounds checking at all. It's returning a real value from a totally different part of the line, which will make it much harder to detect bugs.
I would either:
In the end, the caller is violating your pre-conditions, and you can do whatever you please. But I think these are the most reasonable options.
Also consider what Cătălin said about incorporating built-in STL collections if that's reasonable.