In cppreference.com there are described the overloadings for std::map<Key,T,Compare,Allocator>::erase.
https://en.cppreference.com/w/cpp/container/map/erase
- void erase( iterator pos );
- void erase( iterator first, iterator last );
And then in the complexities for the previous two are:
Given an instance c of map:
- Amortized constant
- log(c.size()) + std::distance(first, last)
I understand the statement that the first overloading is amortized constant. My question is why the second is not and has the term log(c.size())?