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

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
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 need to enable implicit conversions
between distinct safe iterator types, constrained on them belonging to
compatible container types.

That way std::set<int>::iterator and std::set<int, std::less<>>::iterator would
still be distinct types, but would be _mostly_ interchangeable. Not everything
would work though, e.g. anything working with pointers or references to the
iterator types would still be incompatible.

Reply via email to