std::multiset::merge
STD::Multiset::Merge
template | (1) | (since C++17) |
---|---|---|
template<class C2> void merge(std::set<Key, C2, Allocator>&& source | (2) | (since C++17) |
template<class C2> void merge(std::multiset<Key, C2, Allocator>& source | (3) | (since C++17) |
template<class C2> void merge(std::multiset<Key, C2, Allocator>&& source | (4) | (since C++17) |
尝试提取%28“剪接”%29中的每个元素source
然后插入*this
的比较对象*this
...
没有复制或移动元素,只有容器节点的内部指针被重新定位。所有指针和对传输元素的引用都仍然有效,但现在引用为*this
,而不是进入source
...
如果get_allocator() != source.get_allocator()
...
参数
source | - | compatible container to transfer the nodes from |
---|
返回值
%280%29
例外
除非比较抛出,否则不会抛出。
复杂性
n%2Alog%28 size%28%29+N%29%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。