Technically, the compilers can choose to make undefined-behavior implementation-defined-behavior instead. But they don't.
That's kind of also how C++ std::span wound up without overflow checks in practice. And my_arr.at(i) just isn't really being used by anybody.
Seems very user-hostile to me.
Technically, the compilers can choose to make undefined-behavior implementation-defined-behavior instead. But they don't.
That's kind of also how C++ std::span wound up without overflow checks in practice. And my_arr.at(i) just isn't really being used by anybody.
Seems very user-hostile to me.