summaryrefslogtreecommitdiff
path: root/boost/geometry/index/detail/rtree/node/variant_static.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/index/detail/rtree/node/variant_static.hpp')
-rw-r--r--boost/geometry/index/detail/rtree/node/variant_static.hpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/boost/geometry/index/detail/rtree/node/variant_static.hpp b/boost/geometry/index/detail/rtree/node/variant_static.hpp
index 174ceb7e7f..c30998d683 100644
--- a/boost/geometry/index/detail/rtree/node/variant_static.hpp
+++ b/boost/geometry/index/detail/rtree/node/variant_static.hpp
@@ -2,7 +2,7 @@
//
// R-tree nodes based on Boost.Variant, storing static-size containers
//
-// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2018 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -80,36 +80,37 @@ struct visitor<Value, Parameters, Box, Allocators, node_variant_static_tag, IsVi
template <typename Allocator, typename Value, typename Parameters, typename Box>
class allocators<Allocator, Value, Parameters, Box, node_variant_static_tag>
- : public Allocator::template rebind<
- typename node<
- Value, Parameters, Box,
- allocators<Allocator, Value, Parameters, Box, node_variant_static_tag>,
- node_variant_static_tag
+ : public detail::rtree::node_alloc
+ <
+ Allocator, Value, Parameters, Box, node_variant_static_tag
>::type
- >::other
{
- typedef typename Allocator::template rebind<
- Value
- >::other value_allocator_type;
+ typedef detail::rtree::node_alloc
+ <
+ Allocator, Value, Parameters, Box, node_variant_static_tag
+ > node_alloc;
+
+public:
+ typedef typename node_alloc::type node_allocator_type;
+ typedef typename node_alloc::traits::pointer node_pointer;
+
+private:
+ typedef typename boost::container::allocator_traits
+ <
+ node_allocator_type
+ >::template rebind_alloc<Value> value_allocator_type;
+ typedef boost::container::allocator_traits<value_allocator_type> value_allocator_traits;
public:
typedef Allocator allocator_type;
typedef Value value_type;
- typedef value_type & reference;
- typedef const value_type & const_reference;
- typedef typename value_allocator_type::size_type size_type;
- typedef typename value_allocator_type::difference_type difference_type;
- typedef typename value_allocator_type::pointer pointer;
- typedef typename value_allocator_type::const_pointer const_pointer;
-
- typedef typename Allocator::template rebind<
- typename node<Value, Parameters, Box, allocators, node_variant_static_tag>::type
- >::other::pointer node_pointer;
-
- typedef typename Allocator::template rebind<
- typename node<Value, Parameters, Box, allocators, node_variant_static_tag>::type
- >::other node_allocator_type;
+ typedef typename value_allocator_traits::reference reference;
+ typedef typename value_allocator_traits::const_reference const_reference;
+ typedef typename value_allocator_traits::size_type size_type;
+ typedef typename value_allocator_traits::difference_type difference_type;
+ typedef typename value_allocator_traits::pointer pointer;
+ typedef typename value_allocator_traits::const_pointer const_pointer;
inline allocators()
: node_allocator_type()