jermp / pthash

Fast and compact minimal perfect hash functions in C++.
MIT License
190 stars 25 forks source link

C++14 support #8

Closed zsnjuts closed 1 year ago

zsnjuts commented 1 year ago

With C++14, I encountered the following error during compiling the example code:

pthash/include/builders/util.hpp:148:24: error: use of class template 'payload_iterator' requires template arguments
                       payload_iterator(pairs.begin() + i - bucket_size));
                       ^

I fixed this error by using C++17. Is there any way to use pthash under the C++14 standard? Thanks in advance!

jermp commented 1 year ago

Hi, PTHash is not meant to support C++14, since we are almost 10 years ahead. There are numerous features of C++17 that are used in the PTHash codebase.

Why would you need C++14?

zsnjuts commented 1 year ago

Our project is relatively large, and many dependent libraries use the C++14 standard, so we are worried that there will be unknown problems when using C++17

jermp commented 1 year ago

I understand but in this case the other libraries should do the upgrade to C++17, not the other way round.

zsnjuts commented 1 year ago

OK, thanks~