update boost
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017-2023.
|
||||
// Modifications copyright (c) 2017-2023, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
@@ -21,38 +22,33 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_array.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/size.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/algorithms/clear.hpp>
|
||||
#include <boost/geometry/algorithms/for_each.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_box_corners.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/convert_indexed_to_indexed.hpp>
|
||||
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/views/closeable_view.hpp>
|
||||
#include <boost/geometry/views/reversible_view.hpp>
|
||||
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
#include <boost/geometry/views/detail/closed_clockwise_view.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@@ -128,7 +124,7 @@ struct segment_to_range
|
||||
{
|
||||
traits::resize<Range>::apply(range, 2);
|
||||
|
||||
typename boost::range_iterator<Range>::type it = boost::begin(range);
|
||||
auto it = boost::begin(range);
|
||||
|
||||
assign_point_from_index<0>(segment, *it);
|
||||
++it;
|
||||
@@ -144,17 +140,6 @@ template
|
||||
>
|
||||
struct range_to_range
|
||||
{
|
||||
typedef typename reversible_view
|
||||
<
|
||||
Range1 const,
|
||||
Reverse ? iterate_reverse : iterate_forward
|
||||
>::type rview_type;
|
||||
typedef typename closeable_view
|
||||
<
|
||||
rview_type const,
|
||||
geometry::closure<Range1>::value
|
||||
>::type view_type;
|
||||
|
||||
struct default_policy
|
||||
{
|
||||
template <typename Point1, typename Point2>
|
||||
@@ -163,7 +148,7 @@ struct range_to_range
|
||||
geometry::detail::conversion::convert_point_to_point(point1, point2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static inline void apply(Range1 const& source, Range2& destination)
|
||||
{
|
||||
apply(source, destination, default_policy());
|
||||
@@ -175,11 +160,16 @@ struct range_to_range
|
||||
{
|
||||
geometry::clear(destination);
|
||||
|
||||
rview_type rview(source);
|
||||
using view_type = detail::closed_clockwise_view
|
||||
<
|
||||
Range1 const,
|
||||
geometry::closure<Range1>::value,
|
||||
Reverse ? counterclockwise : clockwise
|
||||
>;
|
||||
|
||||
// We consider input always as closed, and skip last
|
||||
// point for open output.
|
||||
view_type view(rview);
|
||||
view_type const view(source);
|
||||
|
||||
typedef typename boost::range_size<Range1>::type size_type;
|
||||
size_type n = boost::size(view);
|
||||
@@ -192,8 +182,7 @@ struct range_to_range
|
||||
// but ok, sice below it == end()
|
||||
|
||||
size_type i = 0;
|
||||
for (typename boost::range_iterator<view_type const>::type it
|
||||
= boost::begin(view);
|
||||
for (auto it = boost::begin(view);
|
||||
it != boost::end(view) && i < n;
|
||||
++it, ++i)
|
||||
{
|
||||
@@ -227,21 +216,17 @@ struct polygon_to_polygon
|
||||
// Container should be resizeable
|
||||
traits::resize
|
||||
<
|
||||
typename boost::remove_reference
|
||||
typename std::remove_reference
|
||||
<
|
||||
typename traits::interior_mutable_type<Polygon2>::type
|
||||
>::type
|
||||
>::apply(interior_rings(destination), num_interior_rings(source));
|
||||
|
||||
typename interior_return_type<Polygon1 const>::type
|
||||
rings_source = interior_rings(source);
|
||||
typename interior_return_type<Polygon2>::type
|
||||
rings_dest = interior_rings(destination);
|
||||
auto const& rings_source = interior_rings(source);
|
||||
auto&& rings_dest = interior_rings(destination);
|
||||
|
||||
typename detail::interior_iterator<Polygon1 const>::type
|
||||
it_source = boost::begin(rings_source);
|
||||
typename detail::interior_iterator<Polygon2>::type
|
||||
it_dest = boost::begin(rings_dest);
|
||||
auto it_source = boost::begin(rings_source);
|
||||
auto it_dest = boost::begin(rings_dest);
|
||||
|
||||
for ( ; it_source != boost::end(rings_source); ++it_source, ++it_dest)
|
||||
{
|
||||
@@ -269,10 +254,8 @@ struct multi_to_multi: private Policy
|
||||
{
|
||||
traits::resize<Multi2>::apply(multi2, boost::size(multi1));
|
||||
|
||||
typename boost::range_iterator<Multi1 const>::type it1
|
||||
= boost::begin(multi1);
|
||||
typename boost::range_iterator<Multi2>::type it2
|
||||
= boost::begin(multi2);
|
||||
auto it1 = boost::begin(multi1);
|
||||
auto it2 = boost::begin(multi2);
|
||||
|
||||
for (; it1 != boost::end(multi1); ++it1, ++it2)
|
||||
{
|
||||
@@ -290,16 +273,25 @@ struct multi_to_multi: private Policy
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
// TODO: We could use std::is_assignable instead of std::is_same.
|
||||
// Then we should rather check ! std::is_array<Geometry2>::value
|
||||
// which is Destination.
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename Tag1 = typename tag_cast<typename tag<Geometry1>::type, multi_tag>::type,
|
||||
typename Tag2 = typename tag_cast<typename tag<Geometry2>::type, multi_tag>::type,
|
||||
std::size_t DimensionCount = dimension<Geometry1>::type::value,
|
||||
bool UseAssignment = boost::is_same<Geometry1, Geometry2>::value
|
||||
&& !boost::is_array<Geometry1>::value
|
||||
bool UseAssignment = std::is_same<Geometry1, Geometry2>::value
|
||||
&& !std::is_array<Geometry1>::value
|
||||
>
|
||||
struct convert: not_implemented<Tag1, Tag2, boost::mpl::int_<DimensionCount> >
|
||||
struct convert
|
||||
: not_implemented
|
||||
<
|
||||
Tag1, Tag2,
|
||||
std::integral_constant<std::size_t, DimensionCount>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
@@ -457,7 +449,7 @@ struct convert<Polygon, Ring, polygon_tag, ring_tag, DimensionCount, false>
|
||||
|
||||
// Dispatch for multi <-> multi, specifying their single-version as policy.
|
||||
// Note that, even if the multi-types are mutually different, their single
|
||||
// version types might be the same and therefore we call boost::is_same again
|
||||
// version types might be the same and therefore we call std::is_same again
|
||||
|
||||
template <typename Multi1, typename Multi2, std::size_t DimensionCount>
|
||||
struct convert<Multi1, Multi2, multi_tag, multi_tag, DimensionCount, false>
|
||||
|
||||
Reference in New Issue
Block a user