|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51983 - trunk/boost/unordered/detail
From: daniel_james_at_[hidden]
Date: 2009-03-26 03:00:47
Author: danieljames
Date: 2009-03-26 03:00:46 EDT (Thu, 26 Mar 2009)
New Revision: 51983
URL: http://svn.boost.org/trac/boost/changeset/51983
Log:
Try to destruct values in a way that all compilers might like.
Text files modified:
trunk/boost/unordered/detail/hash_table.hpp | 5 -----
trunk/boost/unordered/detail/hash_table_impl.hpp | 4 ++--
2 files changed, 2 insertions(+), 7 deletions(-)
Modified: trunk/boost/unordered/detail/hash_table.hpp
==============================================================================
--- trunk/boost/unordered/detail/hash_table.hpp (original)
+++ trunk/boost/unordered/detail/hash_table.hpp 2009-03-26 03:00:46 EDT (Thu, 26 Mar 2009)
@@ -223,11 +223,6 @@
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 2009-03-26 03:00:46 EDT (Thu, 26 Mar 2009)
@@ -130,7 +130,7 @@
void destroy(link_ptr ptr)
{
node* raw_ptr = static_cast<node*>(&*ptr);
- boost::unordered_detail::destroy(&raw_ptr->value());
+ (&raw_ptr->value())->~value_type();
node_ptr n(node_alloc_.address(*raw_ptr));
node_alloc_.destroy(n);
node_alloc_.deallocate(n, 1);
@@ -172,7 +172,7 @@
{
if (node_) {
if (value_constructed_) {
- boost::unordered_detail::destroy(&node_->value());
+ (&node_->value())->~value_type();
}
if (node_constructed_)
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