ZekunYin / RabbitMash

RabbitMash: an efficient highly optimized implementation of Mash.
Other
21 stars 4 forks source link

Add missing #include <limits> to robin_hood.h #2

Closed tmaklin closed 12 months ago

tmaklin commented 12 months ago

Compiling RabbitMash from source fails on Red Hat Enterprise Linux 8.6 (Ootpa) because of a missing include in robin_hood.h, which this PR fixes. See https://github.com/martinus/robin-hood-hashing/issues/125 for the upstream change. Thanks for creating RabbitMash!

Error log:

In file included from src/mash/HashSet.h:13,
                 from src/mash/MinHashHeap.h:6,
                 from src/mash/Sketch.h:17,
                 from src/mash/CommandContain.h:11,
                 from src/mash/CommandContain.cpp:7:
src/mash/robin_hood.h: In member function 'size_t robin_hood::detail::Table<IsFlat, MaxLoadFactor100, Key, T, Hash, KeyEqual>::calcMaxNumElementsAllowed(size_t) const':
src/mash/robin_hood.h:1875:52: error: 'numeric_limits' is not a member of 'std'
 1875 |         if (ROBIN_HOOD_LIKELY(maxElements <= (std::numeric_limits<size_t>::max)() / 100)) {
      |                                                    ^~~~~~~~~~~~~~
ZekunYin commented 12 months ago

Thanks for your contribution!