|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
|
Translation uploaded |
|
doesn't let you set the maximum load factor yourself, it just lets you give a _hint_. And even then, the standard doesn't actually require the container to pay much attention to this value. The only time the load factor is _required_ to be less than the maximum is following a call to `rehash`. But most implementations will try to keep the number of elements below the max load factor, and set the maximum load factor to be the same as or close to the hint - unless your hint is unreasonably small or large.并不允许用户自行设定最大负载因子,该方法仅用于提供__提示__。即便如此,标准也并未强制要求容器必须严格遵守该数值。唯一强制要求负载因子必须小于最大值的场景是在调用 `rehash` 方法之后。但大多数实现会尝试将元素数量维持在最大负载因子以下,并将最大负载因子设定为与提示值相同或接近——除非用户提供的提示值过小或过大。