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要求:`nh` 为空或 `nh.get_allocator()` 与容器的分配器相等。返回:若 `nh` 为空,则返回 `end()`. + + If there was already an element in the container with an equivalent key returns an iterator pointing to that. + + Otherwise returns an iterator pointing to the newly inserted element. Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect. Notes:;; The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. + + 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. + + This can be used to insert a node extracted from a compatible。+ +若容器中已存在等价的键,则返回指向该元素的迭代器。+ +否则,返回指向新插入元素的迭代器。抛出:若调用 `hasher` 以外的操作抛出异常,则函数无效果。说明:标准对 hint 的含义表述相当模糊。但使用它的唯一实际方式,也是 Boost.Unordered 唯一支持的方式,是将其指向具有相同键的现有元素。+ +可能使迭代器失效,但仅当插入导致负载因子大于或等于最大负载因子时才会发生。+ +指向元素的指针和引用永远不会失效。+ +该函数可用于插入从兼容的 `unordered_multiset`.中提取的节点。