c++.stl.port - Removing keys from hash_map
- Mark Evans (7/7) Sep 02 2002 Is this even possible? It seems that once a key is inserted, there is n...
- Mark Evans (2/2) Sep 02 2002 My bad. It is possible. The code I'm dealing with uses an auxiliary ST...
Is this even possible? It seems that once a key is inserted, there is no way to remove it from the hash_map. I can erase() the entry, but that does not eliminate the key. Instead it replaces the associated object with a default-constructed object under the same key. Keys never go away! I want to eliminate key/entry pairs *entirely* from an STLport hash_map. How? Mark
Sep 02 2002
My bad. It is possible. The code I'm dealing with uses an auxiliary STL structure containing just the keys, so a second erasure was necessary.
Sep 02 2002