diff --git a/parallel_hashmap/phmap_base.h b/parallel_hashmap/phmap_base.h index 0c79dc0..c845706 100644 --- a/parallel_hashmap/phmap_base.h +++ b/parallel_hashmap/phmap_base.h @@ -2774,7 +2774,9 @@ public: node_handle_base& operator=(node_handle_base&& other) noexcept { destroy(); if (!other.empty()) { - alloc_ = other.alloc_; + if (other.alloc_) { + alloc_.emplace(other.alloc_.value()); + } PolicyTraits::transfer(alloc(), slot(), other.slot()); other.reset(); }