Suppose I’ve an empty list L. Currently if I run L.front(), it will merrily execute returning a garbage value. Is there some option I can turn on such that executing this would throw an exception or result in an assertion failure?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
GCC STL checked iterators
MSVC checked iterators ( on by default )
STLPort debug mode, with checked iterators
Previous question on the same subject