id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12229,intrusive::unordered_set::rehash() broken,Christian Kaiser ,Ion Gaztañaga,"I do use the intrusive::unordered_set to store language-dependent objects, and when the language changes, I used to use mymap::rehash() to update the buckets. Notice the bucket count does not change! As it is now (1.61), ""fast_shrink"" becomes true: const bool fast_shrink = (!incremental) && (old_bucket_count >= new_bucket_count) && (power_2_buckets || (old_bucket_count % new_bucket_count) == 0); while in the previouis version used, it was const bool fast_shrink = (!incremental) && (old_bucket_count > new_bucket_count) && (power_2_buckets ||(old_bucket_count % new_bucket_count) == 0); and ""fast_shrink"" was false. Due to if(same_buffer && fast_shrink && (n < new_bucket_count)){ new_first_bucket_num = n; n = new_bucket_count; } the ""n"" is set to the bucket count, and the loop that is rehashing is '''NOT''' entered any more, thus rehash() does nothing any more. This is according to the documentation, but a change in behaviour. So I add this as as a warning that the change might cause trouble for some people. A ""rehash(bucket_size+1)"" still does its job, though not as optimal as the size is then not a prime any more. An optional ""force_rehash"" parameter or such to the rehash() function might be handy.",Bugs,new,To Be Determined,intrusive,Boost 1.61.0,Problem,,,