mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-12 12:12:10 +00:00
calls to allocator_traits::construct() and ::destroy() used, this time with valid parameters, C++11 requires raw pointers
[SVN r82966]
This commit is contained in:
@@ -263,9 +263,7 @@ struct create_dynamic_node
|
||||
|
||||
auto_deallocator<AllocNode> 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<Node&>(rtree::get<Node>(*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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -160,9 +160,7 @@ struct create_static_node
|
||||
|
||||
auto_deallocator<AllocNode> 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<AllocNode> 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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user