|
@@ -468,15 +468,9 @@ public:
|
|
|
* @param other The instance to move from.
|
|
* @param other The instance to move from.
|
|
|
* @return This sparse set.
|
|
* @return This sparse set.
|
|
|
*/
|
|
*/
|
|
|
- basic_sparse_set &operator=(basic_sparse_set &&other) noexcept(false) {
|
|
|
|
|
|
|
+ basic_sparse_set &operator=(basic_sparse_set &&other) noexcept {
|
|
|
ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a sparse set is not allowed");
|
|
ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a sparse set is not allowed");
|
|
|
-
|
|
|
|
|
- release_sparse_pages();
|
|
|
|
|
- sparse = std::move(other.sparse);
|
|
|
|
|
- packed = std::move(other.packed);
|
|
|
|
|
- info = other.info;
|
|
|
|
|
- mode = other.mode;
|
|
|
|
|
- head = std::exchange(other.head, policy_to_head());
|
|
|
|
|
|
|
+ swap(other);
|
|
|
return *this;
|
|
return *this;
|
|
|
}
|
|
}
|
|
|
|
|
|