@@ -32,6 +32,7 @@ Author: Michael Tautschnig, mt@eecs.qmul.ac.uk
3232// MURMURHASH2A compares most favourably on String6 with 3076 fewer
3333// calls (2.9%)
3434
35+ #include < climits>
3536#include < cstddef> // std::size_t
3637
3738#ifdef _MSC_VER
@@ -151,7 +152,7 @@ inline std::size_t basic_hash_finalize(
151152// Boost uses the symbol hash_combine, if you're getting problems here then
152153// you've probably included a Boost header after this one
153154#define hash_combine (h1, h2 ) \
154- basic_hash_combine<sizeof (std::size_t )*8 >(h1, h2)
155+ basic_hash_combine<sizeof (std::size_t )*CHAR_BIT >(h1, h2)
155156#define hash_finalize (h1, len ) \
156157 basic_hash_finalize (h1, len)
157158
@@ -304,9 +305,9 @@ inline std::size_t murmurhash2a_hash_finalize<64>(
304305}
305306
306307#define hash_combine (h1, h2 ) \
307- murmurhash2a_hash_combine<sizeof (std::size_t )*8 >(h1, h2)
308+ murmurhash2a_hash_combine<sizeof (std::size_t )*CHAR_BIT >(h1, h2)
308309#define hash_finalize (h1, len ) \
309- murmurhash2a_hash_finalize<sizeof (std::size_t )*8 >(h1, len)
310+ murmurhash2a_hash_finalize<sizeof (std::size_t )*CHAR_BIT >(h1, len)
310311
311312#endif
312313
@@ -466,9 +467,9 @@ inline std::size_t murmurhash3_hash_finalize<64>(
466467}
467468
468469#define hash_combine (h1, h2 ) \
469- murmurhash3_hash_combine<sizeof (std::size_t )*8 >(h1, h2)
470+ murmurhash3_hash_combine<sizeof (std::size_t )*CHAR_BIT >(h1, h2)
470471#define hash_finalize (h1, len ) \
471- murmurhash3_hash_finalize<sizeof (std::size_t )*8 >(h1, len)
472+ murmurhash3_hash_finalize<sizeof (std::size_t )*CHAR_BIT >(h1, len)
472473
473474#endif
474475
0 commit comments