std::unordered_multimap::merge
STD:无序[医]Multimap::合并
template | (1) | (since C++17) |
---|---|---|
template<class H2, class P2> void merge(std::unordered_map<Key, T, H2, P2, Allocator>&& source | (2) | (since C++17) |
template<class H2, class P2> void merge(std::unordered_multimap<Key, T, H2, P2, Allocator>& source | (3) | (since C++17) |
template<class H2, class P2> void merge(std::unordered_multimap<Key, T, H2, P2, Allocator>&& source | (4) | (since C++17) |
尝试提取%28“剪接”%29中的每个元素source
然后插入*this
的散列函数和键相等谓词。*this
...
没有复制或移动元素,只有容器节点的内部指针被重新定位。所有指针和对传输元素的引用都仍然有效,但现在引用为*this
,而不是进入source
.迭代器指传递的元素,所有迭代器都指向*this
都是无效的。
如果get_allocator() != source.get_allocator()
...
参数
source | - | compatible container to transfer the nodes from |
---|
返回值
%280%29
例外
不抛出,除非相等或散列函数抛出。
复杂性
平均病例O%28N%29,最坏病例O%28N%2A大小%28%29+N%29,其中N为source.size()
...
例
另见
extract (C++17) | extracts nodes from the container (public member function) |
---|---|
insert | inserts elements or nodes (since C++17) (public member function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
http://en.cppreference.com/w/cpp/container/unorder[医]多时间点/合并