Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Key
:776Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Requires:要求:;; `value_type`is可以从 `k` 进行 https://en.cppreference.com/w/cpp/named_req/EmplaceConstructible[EmplaceConstructible^]from `k`. 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. + + This overload only participates in overload resolution if。返回:;; 如果进行了插入,则返回类型的 bool 分量为 true。
如果进行了插入,则迭代器指向新插入的元素;否则,指向具有等价键的元素。
抛出:;; 如果除调用 `hasher` 之外的操作抛出异常,则该函数无效。
备注:;; 可能会使迭代器、指针和引用失效,但仅当插入导致负载大于最大负载时才会发生。
此外,仅当 `Hash::is_transparent`
and和 `Pred::is_transparent`are valid member typedefs and neither是有效的成员 typedef,并且 `K` 不能隐式转换为 `iterator`nor或 `const_iterator`are implicitly convertible from `K`. The library assumes that `Hash` is callable with both时,此重载才会参与重载决议。库假定 `Hash` 可同时以 `K`and和 `Key`and that `Pred` is transparent. This enables heterogeneous lookup which avoids the cost of instantiating an instance of the类型调用,且 `Pred` 是透明的。这支持了异构查找,从而避免了实例化 `Key`type.类型的开销。