3 ms·
It's not documented well. If you follow the link to debug mode, one of the features is: > Safe iterators: Iterators keep track of the container whose elements
by planede 4y ago
It's not documented well.
If you follow the link to debug mode, one of the features is:
> Safe iterators: Iterators keep track of the container whose elements they reference, so errors such as incrementing a past-the-end iterator or dereferencing an iterator that points to a container that has been destructed are diagnosed immediately.
Now, this still doesn't say anything about ABI. But in non-debug mode std::vector iterator is essentially a pointer. In debug mode it needs to hold more state to implement iterator invalidation detection and whatnot. So its layout and object representation change, breaking ABI.