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

Does not compile on linux (fedora 34) #125

Closed jpmorr closed 3 years ago

jpmorr commented 3 years ago

Does not compile on linux, I assume because the necessary header files are not included.

src/robin_hood.h:2122:60: error: ‘numeric_limits’ is not a member of ‘std’
 2122 |                 if (ROBIN_HOOD_LIKELY(maxElements <= (std::numeric_limits<size_t>::max)() / 100)) {

I've added :

#include <limits>

which resolves the above error.

martinus commented 3 years ago

Thanks! I've updated the code