|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49955 - trunk/boost/unordered/detail
From: daniel_james_at_[hidden]
Date: 2008-11-27 06:42:13
Author: danieljames
Date: 2008-11-27 06:42:13 EST (Thu, 27 Nov 2008)
New Revision: 49955
URL: http://svn.boost.org/trac/boost/changeset/49955
Log:
Wild stab at getting destruction working on more compilers.
Text files modified:
trunk/boost/unordered/detail/hash_table.hpp | 6 +++++-
trunk/boost/unordered/detail/hash_table_impl.hpp | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
Modified: trunk/boost/unordered/detail/hash_table.hpp
==============================================================================
--- trunk/boost/unordered/detail/hash_table.hpp (original)
+++ trunk/boost/unordered/detail/hash_table.hpp 2008-11-27 06:42:13 EST (Thu, 27 Nov 2008)
@@ -223,7 +223,11 @@
functions func2_;
functions_ptr func_; // The currently active functions.
};
-
+
+ template <typename T>
+ void destroy(T* x) {
+ x->~T();
+ }
}
}
Modified: trunk/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- trunk/boost/unordered/detail/hash_table_impl.hpp (original)
+++ trunk/boost/unordered/detail/hash_table_impl.hpp 2008-11-27 06:42:13 EST (Thu, 27 Nov 2008)
@@ -130,7 +130,7 @@
void destroy(link_ptr 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_alloc_.destroy(n);
node_alloc_.deallocate(n, 1);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk