Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82417 - sandbox-branches/geometry/index/test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-01-09 10:09:06


Author: awulkiew
Date: 2013-01-09 10:09:06 EST (Wed, 09 Jan 2013)
New Revision: 82417
URL: http://svn.boost.org/trac/boost/changeset/82417

Log:
error in rtree exceptions test fixed (adaptation to the new allocator concept).
Text files modified:
   sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp | 30 +++++++++++++++++++++++++++++-
   1 files changed, 29 insertions(+), 1 deletions(-)

Modified: sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp (original)
+++ sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp 2013-01-09 10:09:06 EST (Wed, 09 Jan 2013)
@@ -143,8 +143,11 @@
 // allocators
 
 template <typename Allocator, typename Value, typename Parameters, typename Box>
-struct allocators<Allocator, Value, Parameters, Box, node_throwing_d_mem_static_tag>
+class allocators<Allocator, Value, Parameters, Box, node_throwing_d_mem_static_tag>
 {
+ BOOST_COPYABLE_AND_MOVABLE_ALT(allocators)
+
+public:
     typedef Allocator allocator_type;
     typedef typename allocator_type::size_type size_type;
 
@@ -156,12 +159,37 @@
         typename leaf<Value, Parameters, Box, allocators, node_throwing_d_mem_static_tag>::type
>::other leaf_allocator_type;
 
+ inline allocators()
+ : allocator()
+ , internal_node_allocator()
+ , leaf_allocator()
+ {}
+
     inline explicit allocators(Allocator alloc)
         : allocator(alloc)
         , internal_node_allocator(allocator)
         , leaf_allocator(allocator)
     {}
 
+ inline allocators(allocators const& a)
+ : allocator(a.allocator)
+ , internal_node_allocator(a.internal_node_allocator)
+ , leaf_allocator(a.leaf_allocator)
+ {}
+
+ inline allocators(BOOST_RV_REF(allocators) a)
+ : allocator(boost::move(a.allocator))
+ , internal_node_allocator(boost::move(a.internal_node_allocator))
+ , leaf_allocator(boost::move(a.leaf_allocator))
+ {}
+
+ void swap(allocators & a)
+ {
+ boost::swap(allocator, a.allocator);
+ boost::swap(internal_node_allocator, a.internal_node_allocator);
+ boost::swap(leaf_allocator, a.leaf_allocator);
+ }
+
     allocator_type allocator;
     internal_node_allocator_type internal_node_allocator;
     leaf_allocator_type leaf_allocator;


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