4 ms·
If you don't initialize the initial iterator state, or compare with something that isn't a valid iterator of the same container, you kinda end up with the same
by kimixa 3y ago
If you don't initialize the initial iterator state, or compare with something that isn't a valid iterator of the same container, you kinda end up with the same issues.
The complaint here is that the warnings/errors for the integer case don't seem to be on by default. With the warnings command line flags enabled, this case is easily detected by the compiler, same as if it was some iterator object.