Don't call you integer bound vars `start` and `end` please.
Either use `start` and `endExclusive` or start and length - this greatly reduces confusion.
In my experience, half opened integer intervals lead to fewer `- 1` in the code.
In my experience, half opened integer intervals lead to fewer `- 1` in the code.
For example, look at the...
https://www.boost.org/sgi/stl/stl_introduction.html
...where the documentation is very careful to say "one past the end of the range", and then they proceed to just call `v.end()`. I always thought that was silly.
For closed intervals, I use "start" and "end" or "first" and "last". The terminology is significant!