Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions include/boost/multi_index/hashed_index.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2003-2025 Joaquin M Lopez Munoz.
/* Copyright 2003-2026 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -1432,7 +1432,11 @@ class hashed_index:protected SuperMeta::type
if(n>max_load){
size_type bc =(std::numeric_limits<size_type>::max)();
float fbc=1.0f+static_cast<float>(n)/mlf;
if(bc>fbc)bc =static_cast<size_type>(fbc);
if(bc>fbc){
bc =(std::max)(
static_cast<size_type>(fbc),
static_cast<size_type>(bucket_count()+1));
}
unchecked_rehash(bc);
}
}
Expand Down
Loading