Wild stab at getting destruction working on more compilers.

[SVN r49955]
This commit is contained in:
Daniel James
2008-11-27 11:42:13 +00:00
parent c8e7874534
commit c2425106ea
2 changed files with 6 additions and 2 deletions

View File

@ -223,7 +223,11 @@ namespace boost {
functions func2_; functions func2_;
functions_ptr func_; // The currently active functions. functions_ptr func_; // The currently active functions.
}; };
template <typename T>
void destroy(T* x) {
x->~T();
}
} }
} }

View File

@ -130,7 +130,7 @@ namespace boost {
void destroy(link_ptr ptr) void destroy(link_ptr ptr)
{ {
node* raw_ptr = static_cast<node*>(&*ptr); node* raw_ptr = static_cast<node*>(&*ptr);
raw_ptr->value().~value_type(); boost::unordered_detail::destroy(&raw_ptr->value());
node_ptr n(node_alloc_.address(*raw_ptr)); node_ptr n(node_alloc_.address(*raw_ptr));
node_alloc_.destroy(n); node_alloc_.destroy(n);
node_alloc_.deallocate(n, 1); node_alloc_.deallocate(n, 1);