Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Things to check
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
&& other) noexcept((boost::allocator_traits<Aallocator>::is_always_equal::value || boost::allocator_traits<Aallocator>::propagate_on_container_move_assignment::value) &&& std::is_same<pointer, value_type*="">::value); ```The move assignment operator. Destroys previously existing elements, swaps the hash function and predicate from `other`, and move-assigns the allocator from `other` if `Alloc::propagate_on_container_move_assignment` exists and `Alloc::propagate_on_container_move_assignment::value` is `true`. If at this point the allocator is equal to `other.get_allocator()`, the internal bucket array of `other` is transferred directly to `*this`; otherwise, inserts move-constructed copies of the elements of `other`. If statistics are xref:concurrent_flat_map_boost_unordered_enable_stats[enabled], transfers the internal statistical information from `other` iff the final allocator is equal to `other.get_allocator()`, and always calls `other.reset_stats()`.移动赋值运算符。销毁当前容器原有的所有元素,交换other的哈希函数与谓词;若Alloc::propagate_on_container_move_assignment存在且其值为true,则从other移动赋值分配器。
若此时分配器与other.get_allocator()相等,则直接转移other的内部桶数组至当前容器;否则,插入other元素的移动构造副本。
如果启用了统计功能:
当且仅当最终分配器与other.get_allocator()相等时,从other转移内部统计信息
始终调用other.reset_stats()</pointer,></allocator></allocator>