Static bound checking for array in C++
问题 I'm in need for some guidance regarding a question from a programming languages course I'm taking. We need to come up with a way to implement an array class in C++, so that accessing it's element is statically checked for overflow. We are not to use C++11 (static assertion) nor any other black-box solution - this is a theoretical question, not something I need for coding purposes. we did get a strong hint in the lecture slides : " it is impossible to detect overflow of array indices when