Skip to content

Commit 640aef3

Browse files
committed
Fix issue with std::pmr::polymorphic_allocator
1 parent 53aa8a8 commit 640aef3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

parallel_hashmap/phmap_base.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2774,7 +2774,9 @@ class node_handle_base
27742774
node_handle_base& operator=(node_handle_base&& other) noexcept {
27752775
destroy();
27762776
if (!other.empty()) {
2777-
alloc_ = other.alloc_;
2777+
if (other.alloc_) {
2778+
alloc_.emplace(other.alloc_.value());
2779+
}
27782780
PolicyTraits::transfer(alloc(), slot(), other.slot());
27792781
other.reset();
27802782
}

0 commit comments

Comments
 (0)