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:;; An iterator pointing to the 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.可移动插入^]。返回:指向已插入元素的迭代器。
抛出:如果除调用 `hasher` 之外的操作抛出异常,则该函数无效果。
注意:标准关于 `hint` 的含义表述相当模糊。但唯一实际的使用方式,也是 Boost.Unordered 支持的唯一方式,是将其指向一个具有相同键的已存在元素。
可能使迭代器失效,但仅当插入导致负载因子大于或等于最大负载因子时才会发生。
指向元素的指针和引用永远不会失效。