Setting max_load_factor to infinity in an unordered_set (to avoid re-hashing)

This StackOverflow post was cited on the ISO C++ blog.   Interesting that they set the max_load_factor to std::numeric_limits::infinity(), but the crux of the question is whether it’s ok to iterate over the newly inserted items as well as the original items.

Leave a comment

Filed under C++

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.