From c2425106ea1ce066eb3b383bda02aa52a174aceb Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 27 Nov 2008 11:42:13 +0000 Subject: [PATCH] Wild stab at getting destruction working on more compilers. [SVN r49955] --- include/boost/unordered/detail/hash_table.hpp | 6 +++++- include/boost/unordered/detail/hash_table_impl.hpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/hash_table.hpp b/include/boost/unordered/detail/hash_table.hpp index 264f2ea5..7601c8ff 100644 --- a/include/boost/unordered/detail/hash_table.hpp +++ b/include/boost/unordered/detail/hash_table.hpp @@ -223,7 +223,11 @@ namespace boost { functions func2_; functions_ptr func_; // The currently active functions. }; - + + template + void destroy(T* x) { + x->~T(); + } } } diff --git a/include/boost/unordered/detail/hash_table_impl.hpp b/include/boost/unordered/detail/hash_table_impl.hpp index 20e4e69c..1209d4bb 100644 --- a/include/boost/unordered/detail/hash_table_impl.hpp +++ b/include/boost/unordered/detail/hash_table_impl.hpp @@ -130,7 +130,7 @@ namespace boost { void destroy(link_ptr ptr) { node* raw_ptr = static_cast(&*ptr); - raw_ptr->value().~value_type(); + boost::unordered_detail::destroy(&raw_ptr->value()); node_ptr n(node_alloc_.address(*raw_ptr)); node_alloc_.destroy(n); node_alloc_.deallocate(n, 1);