diff --git a/include/boost/unordered/unordered_node_map.hpp b/include/boost/unordered/unordered_node_map.hpp index c215f4f3..9d046861 100644 --- a/include/boost/unordered/unordered_node_map.hpp +++ b/include/boost/unordered/unordered_node_map.hpp @@ -79,7 +79,7 @@ namespace boost { } template - static void construct(A&, element_type* p, element_type&& x) + static void construct(A&, element_type* p, element_type&& x) noexcept { p->p = x.p; x.p = nullptr; @@ -171,10 +171,15 @@ namespace boost { node_handle(node_handle&& nh) noexcept { + // neither of these move constructors are allowed to throw exceptions + // so we can get away with rote placement new + // new (a) Allocator(std::move(nh.al())); type_policy::construct(al(), reinterpret_cast(x), type_policy::move(nh.element())); + empty_ = false; + reinterpret_cast(nh.a)->~Allocator(); nh.empty_ = true; }