martinus / robin-hood-hashing

Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
https://gitter.im/martinus/robin-hood-hashing
MIT License
1.5k stars 142 forks source link

Insert fails with std::overflow_error #115

Closed slavenf closed 3 years ago

slavenf commented 3 years ago

Example is attached. Example creates robin_hood::unordered_flat_set. More than 5000 elements are inserted. It fails every time. I have used robin hood version 3.9.1

robin-hood-fail-case.cpp.txt

martinus commented 3 years ago

Thanks for the test case! Yet another case of why its bad to bake your own hash :-( I've switched the hash back to murmurhash, the version in master should work.

martinus commented 3 years ago

fixed with other hash