My use case:
map cars; bool exists(const string& name) { // somehow I should find whether my MAP has a car // with the name provid
This does not answer the question but it might be good to know. You can know if it exists by erasing it.
bool existed = cars.erase( name );