update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -2,7 +2,7 @@
//
// boxes union/intersection area/volume
//
// Copyright (c) 2011-2016 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
@@ -11,8 +11,9 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP
#include <boost/geometry/algorithms/intersection.hpp>
#include <boost/geometry/strategies/intersection_strategies.hpp>
#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
#include <boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp>
#include <boost/geometry/index/detail/algorithms/content.hpp>
namespace boost { namespace geometry { namespace index { namespace detail {
@@ -23,11 +24,24 @@ namespace boost { namespace geometry { namespace index { namespace detail {
template <typename Box>
inline typename default_content_result<Box>::type intersection_content(Box const& box1, Box const& box2)
{
if ( geometry::intersects(box1, box2) )
typedef typename strategy::disjoint::services::default_strategy
<
Box, Box
>::type strategy_type;
bool const intersects = ! geometry::detail::disjoint::disjoint_box_box(box1, box2, strategy_type());
if ( intersects )
{
Box box_intersection;
if ( geometry::intersection(box1, box2, box_intersection) )
return detail::content(box_intersection);
bool const ok = geometry::detail::intersection::intersection_box_box
<
0, geometry::dimension<Box>::value
>::apply(box1, box2, 0, box_intersection, 0);
if ( ok )
{
return index::detail::content(box_intersection);
}
}
return 0;
}

View File

@@ -2,7 +2,7 @@
//
// n-dimensional box-linestring intersection
//
// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
// Copyright (c) 2011-2017 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
@@ -11,8 +11,12 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_PATH_INTERSECTION_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_PATH_INTERSECTION_HPP
#include <boost/geometry/index/detail/algorithms/segment_intersection.hpp>
#include <boost/geometry/strategies/default_length_result.hpp>
namespace boost { namespace geometry { namespace index { namespace detail {
namespace dispatch {

View File

@@ -1,6 +1,6 @@
// Boost.Geometry Index
//
// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
// Copyright (c) 2011-2019 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
@@ -10,7 +10,8 @@
#include <boost/mpl/aux_/has_type.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/and.hpp>
//#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_same.hpp>
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_META_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_META_HPP
@@ -37,6 +38,68 @@ struct is_range
// : is_range_of_convertible_values_impl<T, V, is_range<T>::value>
//{};
// Implemented this way in order to prevent instantiation of all type traits at
// once because some of them are causing problems with gcc 4.6 namely
// is_convertible<bg::model::segment<>, std::pair<bg::model::segment<>, T> >
// because segment<> is derived from pair<> and pair<> has copy ctor taking
// other pair<> of any types the compiler tries to instantiate ctor of
// pair<segment, T> taking pair<point, point> which results in instantiation of
// segment's ctor taking a point which results in compilation error.
// This is probably compiler's bug.
template <typename T, typename Value, typename Indexable, typename ResultType, int Ver>
struct convertible_type_impl
{
typedef ResultType type;
};
template <typename T, typename Value, typename Indexable>
struct convertible_type_impl<T, Value, Indexable, void, 0>
{
typedef typename boost::mpl::if_c
<
boost::is_convertible<T, Indexable>::value,
Indexable,
void
>::type result_type;
typedef typename convertible_type_impl
<
T, Value, Indexable, result_type, 1
>::type type;
};
template <typename T, typename Value, typename Indexable>
struct convertible_type_impl<T, Value, Indexable, void, 1>
{
typedef typename boost::mpl::if_c
<
boost::is_convertible<T, Value>::value,
Value,
void
>::type type;
};
template <typename T, typename Value, typename Indexable>
struct convertible_type
{
typedef typename boost::mpl::if_c
<
boost::is_same<T, Value>::value,
Value,
typename boost::mpl::if_c
<
boost::is_same<T, Indexable>::value,
Indexable,
void
>::type
>::type result_type;
typedef typename convertible_type_impl
<
T, Value, Indexable, result_type, 0
>::type type;
};
}}}} // namespace boost::geometry::index::detail
#endif // BOOST_GEOMETRY_INDEX_DETAIL_META_HPP

View File

@@ -12,6 +12,7 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_LINEAR_REDISTRIBUTE_ELEMENTS_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_LINEAR_REDISTRIBUTE_ELEMENTS_HPP
#include <boost/core/ignore_unused.hpp>
#include <boost/type_traits/is_unsigned.hpp>
#include <boost/geometry/index/detail/algorithms/content.hpp>
@@ -156,7 +157,7 @@ struct find_greatest_normalized_separation
seed1 = highest_low_index;
seed2 = lowest_high_index;
::boost::ignore_unused_variable_warning(parameters);
::boost::ignore_unused(parameters);
}
};
@@ -211,7 +212,7 @@ struct find_greatest_normalized_separation<Elements, Parameters, Translator, poi
if ( lowest_index == highest_index )
seed2 = (lowest_index + 1) % elements_count; // % is just in case since if this is true lowest_index is 0
::boost::ignore_unused_variable_warning(parameters);
::boost::ignore_unused(parameters);
}
};

View File

@@ -2,7 +2,7 @@
//
// R-tree scoped deallocator
//
// Copyright (c) 2011-2015 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
@@ -18,10 +18,13 @@ namespace detail { namespace rtree {
template <typename Alloc>
class scoped_deallocator
{
typedef boost::container::allocator_traits<Alloc> alloc_traits;
scoped_deallocator(scoped_deallocator const&);
scoped_deallocator & operator=(scoped_deallocator const&);
public:
typedef typename Alloc::pointer pointer;
typedef typename alloc_traits::pointer pointer;
inline scoped_deallocator(pointer p, Alloc & a)
: m_ptr(p), m_alloc(a)
{}
@@ -29,7 +32,7 @@ public:
{
if ( m_ptr )
{
boost::container::allocator_traits<Alloc>::deallocate(m_alloc, m_ptr, 1);
alloc_traits::deallocate(m_alloc, m_ptr, 1);
}
}
inline void release()

View File

@@ -2,7 +2,7 @@
//
// R-tree nodes based on Boost.Variant, storing dynamic-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
@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP
#include <boost/core/pointer_traits.hpp>
namespace boost { namespace geometry { namespace index {
namespace detail { namespace rtree {
@@ -20,18 +22,17 @@ namespace detail { namespace rtree {
template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
struct variant_internal_node
{
typedef boost::container::vector
typedef rtree::ptr_pair<Box, typename Allocators::node_pointer> element_type;
typedef typename boost::container::allocator_traits
<
rtree::ptr_pair<Box, typename Allocators::node_pointer>,
typename Allocators::node_allocator_type::template rebind
<
rtree::ptr_pair<Box, typename Allocators::node_pointer>
>::other
> elements_type;
typename Allocators::node_allocator_type
>::template rebind_alloc<element_type> allocator_type;
typedef boost::container::vector<element_type, allocator_type> elements_type;
template <typename Al>
inline variant_internal_node(Al const& al)
: elements(al)
: elements(allocator_type(al))
{}
elements_type elements;
@@ -40,18 +41,16 @@ struct variant_internal_node
template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
struct variant_leaf
{
typedef boost::container::vector
typedef typename boost::container::allocator_traits
<
Value,
typename Allocators::node_allocator_type::template rebind
<
Value
>::other
> elements_type;
typename Allocators::node_allocator_type
>::template rebind_alloc<Value> allocator_type;
template <typename Al>
typedef boost::container::vector<Value, allocator_type> elements_type;
template <typename Al>
inline variant_leaf(Al const& al)
: elements(al)
: elements(allocator_type(al))
{}
elements_type elements;
@@ -90,38 +89,59 @@ struct visitor<Value, Parameters, Box, Allocators, node_variant_dynamic_tag, IsV
// allocators
template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
struct node_alloc
{
typedef typename node
<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, Tag>,
Tag
>::type node_type;
typedef typename boost::container::allocator_traits
<
Allocator
>::template rebind_alloc<node_type> type;
typedef boost::container::allocator_traits<type> traits;
};
template <typename Allocator, typename Value, typename Parameters, typename Box>
class allocators<Allocator, Value, Parameters, Box, node_variant_dynamic_tag>
: public Allocator::template rebind<
typename node<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, node_variant_dynamic_tag>,
node_variant_dynamic_tag
: public detail::rtree::node_alloc
<
Allocator, Value, Parameters, Box, node_variant_dynamic_tag
>::type
>::other
{
typedef typename Allocator::template rebind<
Value
>::other value_allocator_type;
typedef detail::rtree::node_alloc
<
Allocator, Value, Parameters, Box, node_variant_dynamic_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 // node_allocator_type for consistency with variant_leaf
>::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 typename value_allocator_type::reference reference;
typedef typename value_allocator_type::const_reference 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_dynamic_tag>::type
>::other::pointer node_pointer;
typedef typename Allocator::template rebind<
typename node<Value, Parameters, Box, allocators, node_variant_dynamic_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()
@@ -183,7 +203,7 @@ struct create_variant_node
scoped_deallocator<AllocNode> deallocator(p, alloc_node);
Al::construct(alloc_node, boost::addressof(*p), Node(alloc_node)); // implicit cast to Variant
Al::construct(alloc_node, boost::to_address(p), Node(alloc_node)); // implicit cast to Variant
deallocator.release();
return p;

View File

@@ -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()

View File

@@ -2,7 +2,7 @@
//
// R-tree nodes based on static conversion, storing dynamic-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
@@ -19,18 +19,17 @@ template <typename Value, typename Parameters, typename Box, typename Allocators
struct weak_internal_node
: public weak_node<Value, Parameters, Box, Allocators, Tag>
{
typedef boost::container::vector
typedef rtree::ptr_pair<Box, typename Allocators::node_pointer> element_type;
typedef typename boost::container::allocator_traits
<
rtree::ptr_pair<Box, typename Allocators::node_pointer>,
typename Allocators::internal_node_allocator_type::template rebind
<
rtree::ptr_pair<Box, typename Allocators::node_pointer>
>::other
> elements_type;
typename Allocators::internal_node_allocator_type
>::template rebind_alloc<element_type> allocator_type;
typedef boost::container::vector<element_type, allocator_type> elements_type;
template <typename Al>
inline weak_internal_node(Al const& al)
: elements(al)
: elements(allocator_type(al))
{}
elements_type elements;
@@ -40,18 +39,16 @@ template <typename Value, typename Parameters, typename Box, typename Allocators
struct weak_leaf
: public weak_node<Value, Parameters, Box, Allocators, Tag>
{
typedef boost::container::vector
typedef typename boost::container::allocator_traits
<
Value,
typename Allocators::leaf_allocator_type::template rebind
<
Value
>::other
> elements_type;
typename Allocators::leaf_allocator_type
>::template rebind_alloc<Value> allocator_type;
typedef boost::container::vector<Value, allocator_type> elements_type;
template <typename Al>
inline weak_leaf(Al const& al)
: elements(al)
: elements(allocator_type(al))
{}
elements_type elements;
@@ -87,49 +84,80 @@ struct visitor<Value, Parameters, Box, Allocators, node_weak_dynamic_tag, IsVisi
// allocators
template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
struct internal_node_alloc
{
typedef typename internal_nod
<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, Tag>,
Tag
>::type node_type;
typedef typename boost::container::allocator_traits
<
Allocator
>::template rebind_alloc<node_type> type;
};
template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
struct leaf_alloc
{
typedef typename leaf
<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, Tag>,
Tag
>::type node_type;
typedef typename ::boost::container::allocator_traits
<
Allocator
>::template rebind_alloc<node_type> type;
};
template <typename Allocator, typename Value, typename Parameters, typename Box>
class allocators<Allocator, Value, Parameters, Box, node_weak_dynamic_tag>
: public Allocator::template rebind<
typename internal_node<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, node_weak_dynamic_tag>,
node_weak_dynamic_tag
>::type
>::other
, public Allocator::template rebind<
typename leaf<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, node_weak_dynamic_tag>,
node_weak_dynamic_tag
>::type
>::other
: public internal_node_alloc<Allocator, Value, Parameters, Box, node_weak_dynamic_tag>::type
, public leaf_alloc<Allocator, Value, Parameters, Box, node_weak_dynamic_tag>::type
{
typedef typename Allocator::template rebind<
Value
>::other value_allocator_type;
typedef detail::rtree::internal_node_alloc
<
Allocator, Value, Parameters, Box, node_weak_dynamic_tag
> internal_node_alloc;
typedef detail::rtree::leaf_alloc
<
Allocator, Value, Parameters, Box, node_weak_dynamic_tag
> leaf_alloc;
typedef detail::rtree::node_alloc
<
Allocator, Value, Parameters, Box, node_weak_dynamic_tag
> node_alloc;
public:
typedef typename internal_node_alloc::type internal_node_allocator_type;
typedef typename leaf_alloc::type leaf_allocator_type;
typedef typename node_alloc::traits::pointer node_pointer;
private:
typedef typename boost::container::allocator_traits
<
leaf_allocator_type // leaf_allocator_type for consistency with weak_leaf
>::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 typename value_allocator_type::reference reference;
typedef typename value_allocator_type::const_reference 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_weak_dynamic_tag>::type
>::other::pointer node_pointer;
typedef typename Allocator::template rebind<
typename internal_node<Value, Parameters, Box, allocators, node_weak_dynamic_tag>::type
>::other internal_node_allocator_type;
typedef typename Allocator::template rebind<
typename leaf<Value, Parameters, Box, allocators, node_weak_dynamic_tag>::type
>::other leaf_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()
: internal_node_allocator_type()
@@ -199,7 +227,7 @@ struct create_weak_node
scoped_deallocator<AllocNode> deallocator(p, alloc_node);
Al::construct(alloc_node, boost::addressof(*p), alloc_node);
Al::construct(alloc_node, boost::to_address(p), alloc_node);
deallocator.release();
return p;

View File

@@ -2,7 +2,7 @@
//
// R-tree nodes based on static conversion, 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
@@ -75,47 +75,46 @@ struct visitor<Value, Parameters, Box, Allocators, node_weak_static_tag, IsVisit
template <typename Allocator, typename Value, typename Parameters, typename Box>
class allocators<Allocator, Value, Parameters, Box, node_weak_static_tag>
: public Allocator::template rebind<
typename internal_node<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, node_weak_static_tag>,
node_weak_static_tag
>::type
>::other
, public Allocator::template rebind<
typename leaf<
Value, Parameters, Box,
allocators<Allocator, Value, Parameters, Box, node_weak_static_tag>,
node_weak_static_tag
>::type
>::other
: public detail::rtree::internal_node_alloc<Allocator, Value, Parameters, Box, node_weak_static_tag>::type
, public detail::rtree::leaf_alloc<Allocator, Value, Parameters, Box, node_weak_static_tag>::type
{
typedef typename Allocator::template rebind<
Value
>::other value_allocator_type;
typedef detail::rtree::internal_node_alloc
<
Allocator, Value, Parameters, Box, node_weak_static_tag
> internal_node_alloc;
typedef detail::rtree::leaf_alloc
<
Allocator, Value, Parameters, Box, node_weak_static_tag
> leaf_alloc;
typedef detail::rtree::node_alloc
<
Allocator, Value, Parameters, Box, node_weak_static_tag
> node_alloc;
public:
typedef typename internal_node_alloc::type internal_node_allocator_type;
typedef typename leaf_alloc::type leaf_allocator_type;
typedef typename node_alloc::traits::pointer node_pointer;
private:
typedef typename boost::container::allocator_traits
<
leaf_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_weak_static_tag>::type
>::other::pointer node_pointer;
typedef typename Allocator::template rebind<
typename internal_node<Value, Parameters, Box, allocators, node_weak_static_tag>::type
>::other internal_node_allocator_type;
typedef typename Allocator::template rebind<
typename leaf<Value, Parameters, Box, allocators, node_weak_static_tag>::type
>::other leaf_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()
: internal_node_allocator_type()

View File

@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_PACK_CREATE_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_PACK_CREATE_HPP
#include <boost/core/ignore_unused.hpp>
#include <boost/geometry/algorithms/expand.hpp>
#include <boost/geometry/index/detail/algorithms/bounds.hpp>
#include <boost/geometry/index/detail/algorithms/nth_element.hpp>
@@ -383,7 +385,7 @@ private:
inline static
subtree_elements_counts calculate_subtree_elements_counts(std::size_t elements_count, parameters_type const& parameters, size_type & leafs_level)
{
boost::ignore_unused_variable_warning(parameters);
boost::ignore_unused(parameters);
subtree_elements_counts res(1, 1);
leafs_level = 0;

View File

@@ -13,6 +13,8 @@
#include <algorithm>
#include <boost/core/ignore_unused.hpp>
#include <boost/geometry/index/detail/algorithms/content.hpp>
#include <boost/geometry/index/detail/algorithms/union_content.hpp>
@@ -75,7 +77,7 @@ inline void pick_seeds(Elements const& elements,
}
}
::boost::ignore_unused_variable_warning(parameters);
::boost::ignore_unused(parameters);
}
} // namespace quadratic

View File

@@ -2,7 +2,7 @@
//
// R-tree R*-tree next node choosing algorithm implementation
//
// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
// Copyright (c) 2011-2019 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
@@ -13,6 +13,8 @@
#include <algorithm>
#include <boost/core/ignore_unused.hpp>
#include <boost/geometry/algorithms/expand.hpp>
#include <boost/geometry/index/detail/algorithms/content.hpp>
@@ -48,7 +50,7 @@ public:
parameters_type const& parameters,
size_t node_relative_level)
{
::boost::ignore_unused_variable_warning(parameters);
::boost::ignore_unused(parameters);
children_type & children = rtree::elements(n);
@@ -63,6 +65,20 @@ public:
}
private:
struct child_contents
{
content_type content_diff;
content_type content;
size_t i;
void set(size_t i_, content_type const& content_, content_type const& content_diff_)
{
i = i_;
content = content_;
content_diff = content_diff_;
}
};
template <typename Indexable>
static inline size_t choose_by_minimum_overlap_cost(children_type const& children,
Indexable const& indexable,
@@ -75,10 +91,8 @@ private:
size_t choosen_index = 0;
// create container of children sorted by content enlargement needed to include the new value
typedef boost::tuple<size_t, content_type, content_type> child_contents;
typename rtree::container_from_elements_type<children_type, child_contents>::type children_contents;
children_contents.resize(children_count);
typename rtree::container_from_elements_type<children_type, child_contents>::type
children_contents(children_count);
for ( size_t i = 0 ; i < children_count ; ++i )
{
@@ -92,7 +106,7 @@ private:
content_type content = index::detail::content(box_exp);
content_type content_diff = content - index::detail::content(ch_i.first);
children_contents[i] = boost::make_tuple(i, content_diff, content);
children_contents[i].set(i, content, content_diff);
if ( content_diff < min_content_diff ||
(content_diff == min_content_diff && content < min_content) )
@@ -123,10 +137,10 @@ private:
return choosen_index;
}
static inline bool content_diff_less(boost::tuple<size_t, content_type, content_type> const& p1, boost::tuple<size_t, content_type, content_type> const& p2)
static inline bool content_diff_less(child_contents const& p1, child_contents const& p2)
{
return boost::get<1>(p1) < boost::get<1>(p2) ||
(boost::get<1>(p1) == boost::get<1>(p2) && boost::get<2>(p1) < boost::get<2>(p2));
return p1.content_diff < p2.content_diff
|| (p1.content_diff == p2.content_diff && (p1.content) < (p2.content));
}
template <typename Indexable, typename ChildrenContents>
@@ -146,8 +160,12 @@ private:
content_type smallest_content = (std::numeric_limits<content_type>::max)();
// for each child node
for (size_t i = 0 ; i < first_n_children_count ; ++i )
for (size_t first_i = 0 ; first_i < first_n_children_count ; ++first_i)
{
size_t i = children_contents[first_i].i;
content_type const& content = children_contents[first_i].content;
content_type const& content_diff = children_contents[first_i].content_diff;
child_type const& ch_i = children[i];
Box box_exp(ch_i.first);
@@ -171,9 +189,6 @@ private:
}
}
content_type content = boost::get<2>(children_contents[i]);
content_type content_diff = boost::get<1>(children_contents[i]);
// update result
if ( overlap_diff < smallest_overlap_diff ||
( overlap_diff == smallest_overlap_diff && ( content_diff < smallest_content_diff ||

View File

@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_INSERT_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_INSERT_HPP
#include <boost/core/ignore_unused.hpp>
#include <boost/geometry/index/detail/algorithms/content.hpp>
namespace boost { namespace geometry { namespace index {
@@ -123,7 +125,7 @@ public:
}
BOOST_CATCH_END
::boost::ignore_unused_variable_warning(parameters);
::boost::ignore_unused(parameters);
}
private:

View File

@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
#include <boost/core/ignore_unused.hpp>
#include <boost/geometry/index/detail/algorithms/intersection_content.hpp>
#include <boost/geometry/index/detail/algorithms/margin.hpp>
#include <boost/geometry/index/detail/algorithms/nth_element.hpp>
@@ -158,7 +160,7 @@ struct choose_split_axis_and_index_for_corner
}
}
::boost::ignore_unused_variable_warning(parameters);
::boost::ignore_unused(parameters);
}
};

View File

@@ -2,7 +2,7 @@
//
// R-tree removing visitor implementation
//
// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
// Copyright (c) 2011-2017 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
@@ -13,7 +13,7 @@
#include <boost/geometry/index/detail/rtree/visitors/is_leaf.hpp>
#include <boost/geometry/algorithms/covered_by.hpp>
#include <boost/geometry/algorithms/detail/covered_by/interface.hpp>
namespace boost { namespace geometry { namespace index {

View File

@@ -19,6 +19,7 @@
#endif
#include <boost/config.hpp>
#include <boost/core/ignore_unused.hpp>
#include <boost/swap.hpp>
#include <boost/integer.hpp>
@@ -75,8 +76,7 @@ struct checker
{
BOOST_GEOMETRY_INDEX_ASSERT(s <= v.capacity(), "size too big");
::boost::ignore_unused_variable_warning(v);
::boost::ignore_unused_variable_warning(s);
::boost::ignore_unused(v, s);
}
static inline void throw_out_of_bounds(Varray const& v, size_type i)
@@ -84,39 +84,35 @@ struct checker
if ( v.size() <= i )
throw_out_of_range("index out of bounds");
::boost::ignore_unused_variable_warning(v);
::boost::ignore_unused_variable_warning(i);
::boost::ignore_unused(v, i);
}
static inline void check_index(Varray const& v, size_type i)
{
BOOST_GEOMETRY_INDEX_ASSERT(i < v.size(), "index out of bounds");
::boost::ignore_unused_variable_warning(v);
::boost::ignore_unused_variable_warning(i);
::boost::ignore_unused(v, i);
}
static inline void check_not_empty(Varray const& v)
{
BOOST_GEOMETRY_INDEX_ASSERT(!v.empty(), "the container is empty");
::boost::ignore_unused_variable_warning(v);
::boost::ignore_unused(v);
}
static inline void check_iterator_end_neq(Varray const& v, const_iterator position)
{
BOOST_GEOMETRY_INDEX_ASSERT(v.begin() <= position && position < v.end(), "iterator out of bounds");
::boost::ignore_unused_variable_warning(v);
::boost::ignore_unused_variable_warning(position);
::boost::ignore_unused(v, position);
}
static inline void check_iterator_end_eq(Varray const& v, const_iterator position)
{
BOOST_GEOMETRY_INDEX_ASSERT(v.begin() <= position && position <= v.end(), "iterator out of bounds");
::boost::ignore_unused_variable_warning(v);
::boost::ignore_unused_variable_warning(position);
::boost::ignore_unused(v, position);
}
};