Skip to content

Commit 34c52fa

Browse files
committed
Fix issue with std::pmr::polymorphic_allocator
1 parent ff22b8c commit 34c52fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/gtl/gtl_base.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,9 @@ class node_handle_base {
713713
node_handle_base& operator=(node_handle_base&& other) noexcept {
714714
destroy();
715715
if (!other.empty()) {
716-
alloc_ = other.alloc_;
716+
if (other.alloc_) {
717+
alloc_.emplace(other.alloc_.value());
718+
}
717719
PolicyTraits::transfer(alloc(), slot(), other.slot());
718720
other.reset();
719721
}

0 commit comments

Comments
 (0)