September 02, 2002 Removing keys from hash_map | ||||
---|---|---|---|---|
| ||||
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 |
September 03, 2002 Re: Removing keys from hash_map | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mark Evans | 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. |
Copyright © 1999-2021 by the D Language Foundation