18template <
typename T,
typename N>
19inline std::enable_if_t<(
sizeof(
N) == 4)>
hash_combine(N& nSeed, T
const* pValue,
size_t nCount)
21 static_assert(
sizeof(nSeed) == 4);
24 nSeed ^= std::hash<T>{}(*pValue) + 0x9E3779B9u + (nSeed << 6) + (nSeed >> 2);
29template <
typename T,
typename N>
30inline std::enable_if_t<(
sizeof(
N) == 4)>
hash_combine(N& nSeed, T
const& nValue)
32 static_assert(
sizeof(nSeed) == 4);
33 nSeed ^= std::hash<T>{}(
nValue) + 0x9E3779B9u + (nSeed << 6) + (nSeed >> 2);
36template <
typename T,
typename N>
37inline std::enable_if_t<(
sizeof(
N) == 8)>
hash_combine(N& nSeed, T
const* pValue,
size_t nCount)
39 static_assert(
sizeof(nSeed) == 8);
42 nSeed ^= std::hash<T>{}(*pValue) + 0x9E3779B97F4A7C15llu + (nSeed << 12) + (nSeed >> 4);
47template <
typename T,
typename N>
48inline std::enable_if_t<(
sizeof(
N) == 8)>
hash_combine(N& nSeed, T
const& nValue)
50 static_assert(
sizeof(nSeed) == 8);
51 nSeed ^= std::hash<T>{}(
nValue) + 0x9E3779B97F4A7C15llu + (nSeed << 12) + (nSeed >> 4);
std::enable_if_t<(sizeof(N)==4)> hash_combine(N &nSeed, T const *pValue, size_t nCount)