Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

tmaklin
Copy link
Contributor

@tmaklin tmaklin commented Oct 26, 2023

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 martinus/robin-hood-hashing#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 ZekunYin merged commit 044b9fd into ZekunYin:master Oct 28, 2023
@ZekunYin
Copy link
Owner

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants