Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Requires:;; `nh` is empty or `nh.get_allocator()` is equal to the container's allocator. Returns:;; If `nh` was empty, returns an要求:`nh` 为空或 `nh.get_allocator()` 与容器的分配器相等。返回:若 `nh` 为空,则返回一个 `insert_return_type`with:,其中:`inserted`equal to为 `false`,,`position`equal to等于 `end()`and,`node`empty. + + Otherwise if there was already an element with an equivalent key, returns an为空。+ +否则若已存在等价的键,则返回一个 `insert_return_type`with:,其中:`inserted`equal to为 `false`,,`position`pointing to a matching element and `node` contains the node from `nh`. + + Otherwise if the insertion succeeded, returns an指向匹配的元素,`node` 包含 `nh` 中的节点。+ +否则若插入成功,则返回一个 `insert_return_type`with:,其中:`inserted`equal to为 `true`,,`position`pointing to the newly inserted element and `node` empty. 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 factor to be greater to or equal to the maximum load factor. + + Pointers and references to elements are never invalidated. + + In C++17 this can be used to insert a node extracted from a compatible `unordered_multiset`, but that is not supported yet.指向新插入的元素,`node` 为空。抛出:若调用 `hasher` 以外的操作抛出异常,则函数无效果。说明:可能使迭代器失效,但仅当插入导致负载因子大于或等于最大负载因子时才会发生。+ +指向元素的指针和引用永远不会失效。+ +在 C++17 中,该函数可用于插入从兼容的 `unordered_multiset` 中提取的节点,但该功能尚未支持。