Not that C++ STL and exceptions would be anything to take inspiration from, but there's std::out_of_range. Python IndexError is also specified as "index out of range", not "bounds".