Re:Very funny, gdb. Ve-ery funny
by roel_v on Saturday January 11, 2014 @04:57PM
(#7043932)
You can't switch between .at() and [] between two builds. There is a lot to be said about MSVC's checked iterators, but it sure does catch a lot of mistakes during debug builds. Any sane STL implementation should have something similar.
[ Parent
| on HN ]
FYI, with libstdc++ (GCC) you can define _GLIBCXX_DEBUG and get a lot of runtime checks too, including bounds checking on vectors.
http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch30s...