Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
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/CopyInsertable[CopyInsertable^]. 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, pointers and references, but only if the insert causes the load to be greater than the maximum load. + + A call of the form `insert(hint, x)`, where `x` is equally convertible to both可复制插入^] 要求。返回:若执行了插入,则返回类型中的 `bool` 分量为 `true`。+ +若执行了插入,则迭代器指向新插入的元素;否则指向等价的元素。抛出:若调用 `hasher` 以外的操作抛出异常,则函数无效果。注意:可能使迭代器、指针和引用失效,但仅当插入导致负载大于最大负载时才会发生。+ +形式为 `insert(hint, x)` 的调用(其中 `x` 可同等转换为 `const value_type&` andamp;` 和 `const init_type&`, is not ambiguous and selects theamp;`)不会产生歧义,并且会选择 `init_type`overload.重载。