Recently I went to use std::unordered_map::erase, and see the function has some overloads:
iterator erase( const_iterator pos ); (1) (since C++11)
iterator erase( iterator pos ); (1) (since C++17)
iterator erase( const_iterator first, const_iterator last ); (2) (since C++11)
size_type erase( const key_type& key ); (3) (since C++11)
And in the description of the functions return value mentioned:
Return value
1-2) Iterator following the last removed element.
3) Number of elements removed.
The last one (3), saying we could have the number of removed elements. Does that mean it's possible to have the same keys on the map?