Closed freshFruict closed 7 months ago
Can you please create a PR to fix this behavior?
Btw, if anyone is interested, here's another hash map we currently use (it's a wrapper that makes ankerl's unordered_dense
hash map compatible to cista):
https://github.com/motis-project/unordered_dense/blob/main/include/ankerl/cista_adapter.h
v0.15 is released with the fix and lot's of other new data structures, and small improvements.
It appears that when assigning one hash_map to another in both cista::raw::hash_map and cista::offset::hash_map, only keys that do not already exist in the destination hash_map are copied, while existing keys are ignored. So clear() must be called to replace them. This behavior seems unintended, but if it is intentional, it should be mentioned in the documentation. I'm using the latest version.