Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Things to check
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
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 factor to be greater to or equal to the maximum load factor. + + Pointers and references to elements are never invalidated. + + The返回:返回类型的 bool 分量为 true 表示发生了插入。如果发生了插入,则迭代器指向新插入的元素;否则,指向具有等价键的元素。
抛出:如果除调用 `hasher` 之外的操作抛出异常,则该函数无效果。
注意:可能使迭代器失效,但仅当插入导致负载因子大于或等于最大负载因子时才会发生。
指向元素的指针和引用永远不会失效。
`template<class
K,k,="" classM>` only participates in overload resolution if="" m="">` 仅在 `Hash::is_transparent`and和 `Pred::is_transparent`are valid member typedefs. The library assumes that `Hash` is callable with both是有效的成员 typedef 时参与重载决议。库假定 `Hash` 可同时使用 `K`and和 `Key`and that `Pred` is transparent. This enables heterogeneous lookup which avoids the cost of instantiating an instance of the `Key` type.调用,且 `Pred` 是透明的。这支持了异构查找,从而避免了实例化 `Key` 类型对象的开销。</class>