ned14 / quickcpplib

Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

algorithm/hash is incompatible with MSVC arm64

BurningEnlightenment opened this issue · comments

#if defined(__x86_64__) || defined(_M_X64) || defined(__aarch64__) || defined(__ia64__) || defined(_M_IA64) || defined(__ppc64__)
static constexpr size_t basis = 14695981039346656037ULL, prime = 1099511628211ULL;
static_assert(sizeof(size_t) == 8, "size_t is not 64 bit");
#else
static constexpr size_t basis = 2166136261U, prime = 16777619U;
static_assert(sizeof(size_t) == 4, "size_t is not 32 bit");
#endif

The arch detection list is missing _M_ARM64. However, I think keying on SIZE_MAX from <cstdint> should work without relying on compiler specifics.