https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169

--- Comment #5 from M Welinder <terra at gnome dot org> ---
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:

    std::map<int,int> foo;
    std::multimap<int,int>::iterator = foo.end();

You get this kind of code when someone changes the container type and uses the
compiler to point out where further fixes are needed.

Is it an option to make the iterators different for the non-debug case too?
Would that be an ABI change?

Reply via email to