https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #9 from Jonathan Wakely ---
I was looking at this again in the context of
https://cplusplus.github.io/LWG/issue3578
If we ever wanted to make the debug mode iterators SCARY (or if the standard
ever required it) then I think we would
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #7 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #6)
> they have a pointer back to their patent container
s/patent/parent/
As for solving the problem of switching containers, use a typedef for the
container, or
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #6 from Jonathan Wakely ---
It's not an option IMHO. See http://www.stroustrup.com/SCARY.pdf for the
benefits of the current design. Those benefits outweigh the advantage of having
non-portable code diagnosed. Debug iterators can't b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #5 from M Welinder ---
I agree that anyone depending on map and multimap iterators to mix deserves
whatever happens as a result. It would, however, be nice g++ would reject such
programs outright. Currently this is accepted:
st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #4 from Jonathan Wakely ---
The standard allows iterators of different containers to be different, your
program is not portable of it assumes they will (or will not) be the same type.
I don't consider this a bug, and am not very moti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #3 from M Welinder ---
A similar divergence of types occurs between the types
std::map::iterator
std::multimap::iterator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #2 from M Welinder ---
Created attachment 33347
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33347&action=edit
Preprocessed source code for debug case
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #1 from M Welinder ---
Created attachment 33346
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33346&action=edit
Preprocessed source code for normal case