From c47f314aaa8028b9a660590eb3c59f6efafafd11 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Mon, 18 Feb 2013 03:37:52 +0000 Subject: [PATCH] calls to allocator_traits::construct() and ::destroy() used, this time with valid parameters, C++11 requires raw pointers [SVN r82966] --- .../index/detail/rtree/node/node_d_mem_dynamic.hpp | 8 ++------ .../index/detail/rtree/node/node_s_mem_dynamic.hpp | 9 ++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/include/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp b/include/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp index ca767c3b8..c282e91f0 100644 --- a/include/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp +++ b/include/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp @@ -263,9 +263,7 @@ struct create_dynamic_node auto_deallocator deallocator(alloc_node, p); - alloc_node.construct(p, Node(alloc_node)); - // TEMPORARILY COMMENTED OUT - //Al::construct(alloc_node, p, alloc_node); + Al::construct(alloc_node, boost::addressof(*p), alloc_node); deallocator.release(); return p; @@ -284,9 +282,7 @@ struct destroy_dynamic_node typedef typename Al::pointer P; P p(&static_cast(rtree::get(*n))); - alloc_node.destroy(p); - // TEMPORARILY COMMENTED OUT - //Al::destroy(alloc_node, p); + Al::destroy(alloc_node, boost::addressof(*p)); Al::deallocate(alloc_node, p, 1); } }; diff --git a/include/boost/geometry/index/detail/rtree/node/node_s_mem_dynamic.hpp b/include/boost/geometry/index/detail/rtree/node/node_s_mem_dynamic.hpp index b569dd5a7..2090aabb3 100644 --- a/include/boost/geometry/index/detail/rtree/node/node_s_mem_dynamic.hpp +++ b/include/boost/geometry/index/detail/rtree/node/node_s_mem_dynamic.hpp @@ -160,9 +160,7 @@ struct create_static_node auto_deallocator deallocator(alloc_node, p); - alloc_node.construct(p, Node(alloc_node)); - // TEMPORARILY COMMENTED OUT - //Al::construct(alloc_node, p, Node(alloc_node)); // implicit cast to Variant + Al::construct(alloc_node, boost::addressof(*p), Node(alloc_node)); // implicit cast to Variant deallocator.release(); return p; @@ -178,11 +176,8 @@ struct destroy_static_node static inline void apply(AllocNode & alloc_node, VariantPtr n) { typedef boost::container::allocator_traits Al; - typedef typename Al::pointer P; - alloc_node.destroy(n); - // TEMPORARILY COMMENTED OUT - //Al::destroy(alloc_node, n); + Al::destroy(alloc_node, boost::addressof(*n)); Al::deallocate(alloc_node, n, 1); } };