Visual C++ on debug mode also enables iterator validation and bounds checking for arrays and strings.
It is also possible to explicitly enable them in release code.
https://blogs.msdn.microsoft.com/vcblog/2017/06/28/security-...
It is also possible to explicitly enable them in release code.
https://blogs.msdn.microsoft.com/vcblog/2017/06/28/security-...
indeed. for gcc, you can compile stuff with '-D_GLIBCXX_DEBUG' to enable random-iterator bound checks. moreover, random-access-iterators do have the 'at(...)' stuff available for bounds checked access to the containers.
but, yeah, a standardized way would be very useful.