made emplace_impl rehashing more robust

This commit is contained in:
joaquintides
2022-09-28 10:05:45 +02:00
parent 2889aab226
commit 5293b328b7

View File

@@ -821,7 +821,7 @@ private:
return {it,false};
}
else if(BOOST_UNLIKELY(size_>=ml)){
unchecked_rehash(capacity()+1); // TODO wrong if mlf is allowed to change
unchecked_rehash(std::size_t(std::ceil((size_+1)/mlf)));
pos0=position_for(hash);
}
return {