The map::erase() method has two overloads to remove a single item:
void erase ( iterator position );
size_type erase ( const key_type& x );
I need to check which version is likely to be faster - my guess would be the first, because the second probably has to call map::find() to look up the iterator?
Can anyone confirm?
Thanks!