Why does unordered_map increase in size when it has enough buckets due to “reserve”?

后端 未结 0 1732
难免孤独
难免孤独 2021-01-29 14:09

Consider this code. I reserve 6 spots for an unordered_map and insert 6 elements. Afterwards, there are 7 buckets. Why is this? The max_load_factor is 1 and there are enough buc

相关标签:
回答
  • 消灭零回复
提交回复
热议问题