Skip to content

Commit 4e4dff8

Browse files
committed
fix fast_perfect_hash range check (windows)
1 parent 3e381d6 commit 4e4dff8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/boost/openmethod/policies/fast_perfect_hash.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ void fast_perfect_hash<Policy>::hash_initialize(
101101
for (std::size_t pass = 0; pass < 4; ++pass, ++M) {
102102
hash_shift = 8 * sizeof(type_id) - M;
103103
auto hash_size = 1 << M;
104+
hash_min = (std::numeric_limits<std::size_t>::max)();
105+
hash_max = (std::numeric_limits<std::size_t>::min)();
104106

105107
if constexpr (trace_enabled) {
106108
if (Policy::trace_enabled) {
@@ -182,8 +184,7 @@ type_id fast_perfect_hash<Policy>::hash_mult;
182184
template<class Policy>
183185
std::size_t fast_perfect_hash<Policy>::hash_shift;
184186
template<class Policy>
185-
std::size_t fast_perfect_hash<Policy>::hash_min =
186-
std::numeric_limits<std::size_t>::max();
187+
std::size_t fast_perfect_hash<Policy>::hash_min;
187188
template<class Policy>
188189
std::size_t fast_perfect_hash<Policy>::hash_max;
189190

0 commit comments

Comments
 (0)