https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89763
Bug ID: 89763 Summary: Making iterator's operator== breaks existing code Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: dan at stahlke dot org Target Milestone: --- gcc 9 has made operator== and operator!= free functions for std::map (and probably other) iterators. Probably this is considered an implementation detail and not a violation of the standard, but I thought I'd bring it to your attention that this breaks CINT. CINT does things like this: ./src/gcc3strm.cxx: G__letint(result7,103,(long)((fpos<mbstate_t>*)(G__getstructoffset()))->operator==(*(fpos<mbstate_t>*)libp->para[0].ref)); ./src/Apiifold.cxx: G__letint(result7,105,(long)((G__ClassInfo*)(G__getstructoffset()))->operator==(*(G__ClassInfo*)libp->para[0].ref)); ./src/Apiifold.cxx: G__letint(result7,105,(long)((G__TypeInfo*)(G__getstructoffset()))->operator==(*(G__TypeInfo*)libp->para[0].ref)); ./src/Apiif.cxx: G__letint(result7,105,(long)((G__ClassInfo*)(G__getstructoffset()))->operator==(*(G__ClassInfo*)libp->para[0].ref)); ./src/Apiif.cxx: G__letint(result7,105,(long)((G__TypeInfo*)(G__getstructoffset()))->operator==(*(G__TypeInfo*)libp->para[0].ref)); Given that CINT is no longer supported, CERN is not likely to release any patches for this. Here is a standalone demonstration of the issue: #include <map> bool f() { std::map<int, int> m; auto it = m.begin(); return it.operator==(it); }