According to this answer, an iterator must be implicitly convertible to const_iterator. Since that's true, as we can see on happening in insert_on_assign, why in c++17 was added a new signature to std::map::erase where in c++11 we have iterator erase( const_iterator pos ); and, now, in c++17 we have iterator...