The documentation for hash_map.insert(value_type) only mentions that it returns a pair<iterator,bool>, with the bool false when the key was already in the map. It doesn't say what happens to the value in that case. I expected that it would overwrite. I was in for a big surprise and a lot of debugging to discover what the routine did.
Perhaps this ought to be mentioned in the documentation.
What the reason to override object that has same key, i.e. _identical_ object? Looks like evident that it not override: just useless copy.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.