Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Things to check
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Requires:;;要求:`value_type`is满足 https://en.cppreference.com/w/cpp/named_req/MoveInsertable[MoveInsertable^]. Returns:;; The `bool` component of the return type is `true` if an insert took place. + + If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key. Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect. Notes:;; Can invalidate iterators, but only if the insert causes the load to be greater than the maximum load. + + A call of the form `insert(x)`, where `x` is equally convertible to both `value_type&&` and `init_type&&`, is not ambiguous and selects the可移动插入^]。返回:返回类型的 `bool` 分量为 `true` 表示发生了插入。
如果发生了插入,则迭代器指向新插入的元素;否则,指向具有等价键的元素。
抛出:如果除调用 `hasher` 之外的操作抛出异常,则该函数无效果。
注意:可能使迭代器失效,但仅当插入导致负载大于最大负载时才会发生。
形式为 `insert(x)` 的调用,如果 `x` 可以同等转换为 `value_type&&` 和 `init_type&&`,则不会产生歧义,并且会选择 `init_type`
overload.重载。