The insert operation in cuco::dynamic_map fails when attempting to insert a duplicate key. #730
Replies: 2 comments 3 replies
-
The behavior you observed is expected. If a key already exists in the hash table, reinserting it with a different value has no effect. To update the value associated with a key in |
Beta Was this translation helpful? Give feedback.
-
@iamlazy123 is it possible to switch your workflow to use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When calling the insert method of cuco::dynamic_map, I found that it fails if the key already exists. Here is my test code:
The output is:
In the previous example, the insert operation did not overwrite the existing entries {1:10, 2:20} as expected when attempting to insert {1:101, 2:102}.
So what would be the proper way to implement this feature?
Beta Was this translation helpful? Give feedback.
All reactions