Iterator exception bypass error in Visual C ++ 2010

When I look for a list iterator, I get an error that the iterator cannot be dereferenced. This, however, does not happen when I create the Release version, and this only happens in the Debug version.

Is there a way around this error?

-1
source share
1 answer

You do not want to bypass this check. This tells you that something is wrong with your code and only APPEARS to leave in release mode. What actually happens is that you get undefined behavior that seems to work the way you want it to. In fact, this will fail at some unpredictable point in the future, which will cause even greater grief and possibly many hours of debugging.

0
source

Source: https://habr.com/ru/post/1795302/


All Articles