diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-12-17 02:29:50 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-12-17 02:41:04 +0300 |
commit | b8e1d027efd9cc6df3e4d388c767d9e07322b788 (patch) | |
tree | 1dedfcd1ed3d7982d06a2835b997905cdad39d78 /contrib/restricted/boost | |
parent | 76fb25d3c68401815a12408f9ddf0c0134645f1b (diff) | |
download | ydb-b8e1d027efd9cc6df3e4d388c767d9e07322b788.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/restricted/boost')
72 files changed, 241 insertions, 241 deletions
diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/assign.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/assign.hpp index dabf1b4a57..5386ac6494 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/assign.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/assign.hpp @@ -216,7 +216,7 @@ template <typename Geometry1, typename Geometry2> struct assign { static inline void - apply(Geometry1& geometry1, const Geometry2& geometry2) + apply(Geometry1& geometry1, Geometry2 const& geometry2) { concepts::check<Geometry1>(); concepts::check<Geometry2 const>(); diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/centroid.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/centroid.hpp index bcf4dd0e8d..43ac999e51 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/centroid.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/centroid.hpp @@ -82,16 +82,9 @@ class centroid_exception : public geometry::exception { public: - /*! - \brief The default constructor - */ inline centroid_exception() {} - /*! - \brief Returns the explanatory string. - \return Pointer to a null-terminated string with explanatory information. - */ - virtual char const* what() const noexcept + char const* what() const noexcept override { return "Boost.Geometry Centroid calculation exception"; } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/correct_closure.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/correct_closure.hpp index 38d982c91b..0521c38b81 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/correct_closure.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/correct_closure.hpp @@ -26,6 +26,7 @@ #include <boost/geometry/geometries/concepts/check.hpp> #include <boost/geometry/util/range.hpp> +#include <boost/range/size.hpp> namespace boost { namespace geometry { diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp index 8aa9493420..66943b303c 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp @@ -698,7 +698,7 @@ struct buffered_piece_collection BOOST_GEOMETRY_ASSERT(pc.offsetted_count >= 0); } - inline void add_piece_point(piece& pc, const point_type& point, bool add_to_original) + inline void add_piece_point(piece& pc, point_type const& point, bool add_to_original) { if (add_to_original && pc.type != strategy::buffer::buffered_concave) { diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp index f1014c9bb4..f217c53b01 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp @@ -77,7 +77,7 @@ struct line_line_intersection // | pa pa | // | qb qb | auto const denominator_pq = determinant<line, &line::a, &line::b>(p, q); - constexpr decltype(denominator_pq) const zero = 0; + static decltype(denominator_pq) const zero = 0; if (equidistant) { diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp index d773d32c36..3861fcbe57 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp @@ -18,6 +18,7 @@ #include <array> #include <boost/core/addressof.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/config.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp index daa59b618b..12fffc4c4a 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp @@ -16,8 +16,9 @@ #include <boost/core/ignore_unused.hpp> -#include <boost/geometry/core/coordinate_type.hpp> +#include <boost/range/size.hpp> +#include <boost/geometry/core/coordinate_type.hpp> #include <boost/geometry/algorithms/detail/buffer/buffer_policies.hpp> #include <boost/geometry/algorithms/detail/disjoint/interface.hpp> #include <boost/geometry/algorithms/expand.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp index ed2efd6fce..678502bce6 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp @@ -14,7 +14,6 @@ #include <boost/range/begin.hpp> #include <boost/range/end.hpp> -#include <boost/range/size.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/closure.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp index f59c85a9b5..2c0f22d5bd 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp @@ -12,6 +12,8 @@ #include <iterator> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/covered_by.hpp> #include <boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp> #include <boost/geometry/algorithms/detail/closest_points/utilities.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp index 64d81054e8..20fd09bf58 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp @@ -23,6 +23,8 @@ #include <algorithm> #include <vector> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/detail/for_each_range.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/closure.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp index b820cc4bf4..884a9278b3 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp @@ -24,6 +24,8 @@ #include <array> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/detail/assign_box_corners.hpp> #include <boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp> #include <boost/geometry/algorithms/detail/equals/point_point.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp index 4424f144b0..1361811dab 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp @@ -22,6 +22,8 @@ #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_LINEAR_SEGMENT_OR_BOX_HPP +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/detail/disjoint/multirange_geometry.hpp> #include <boost/geometry/algorithms/dispatch/disjoint.hpp> #include <boost/geometry/algorithms/not_implemented.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp index f230958437..c3d079eb7b 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp @@ -12,6 +12,8 @@ #include <vector> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/dispatch/distance.hpp> #include <boost/geometry/algorithms/detail/visit.hpp> #include <boost/geometry/core/assert.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp index b908c3e535..40ea1e4245 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp @@ -21,6 +21,7 @@ #include <boost/numeric/conversion/cast.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/detail/normalize.hpp> #include <boost/geometry/algorithms/not_implemented.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/has_self_intersections.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/has_self_intersections.hpp index 49658ea2e0..4074f0d4f0 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/has_self_intersections.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/has_self_intersections.hpp @@ -53,7 +53,7 @@ public: inline overlay_invalid_input_exception() {} - virtual char const* what() const noexcept + char const* what() const noexcept override { return "Boost.Geometry Overlay invalid input exception"; } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/box_box.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/box_box.hpp index 30c31ff1e5..ff99a2290c 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/box_box.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/box_box.hpp @@ -16,7 +16,7 @@ #include <boost/geometry/algorithms/detail/intersection/interface.hpp> -#include <boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp> +#include <boost/geometry/algorithms/detail/intersection/box_box_implementation.hpp> namespace boost { namespace geometry diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/box_box_implementation.hpp index 31db94dd95..86478226c7 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/box_box_implementation.hpp @@ -11,12 +11,11 @@ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_INTERSECTION_BOX_BOX_HPP -#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_INTERSECTION_BOX_BOX_HPP +#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTION_BOX_BOX_IMPLEMENTATION_HPP +#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTION_BOX_BOX_IMPLEMENTATION_HPP #include <boost/geometry/core/access.hpp> -#include <boost/geometry/core/coordinate_type.hpp> namespace boost { namespace geometry @@ -42,18 +41,16 @@ struct intersection_box_box BoxOut& box_out, Strategy const& strategy) { - typedef typename coordinate_type<BoxOut>::type ct; - - ct max1 = get<max_corner, Dimension>(box1); - ct min2 = get<min_corner, Dimension>(box2); + auto max1 = get<max_corner, Dimension>(box1); + auto min2 = get<min_corner, Dimension>(box2); if (max1 < min2) { return false; } - ct max2 = get<max_corner, Dimension>(box2); - ct min1 = get<min_corner, Dimension>(box1); + auto max2 = get<max_corner, Dimension>(box2); + auto min1 = get<min_corner, Dimension>(box1); if (max2 < min1) { @@ -93,4 +90,4 @@ struct intersection_box_box<DimensionCount, DimensionCount> }} // namespace boost::geometry -#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_INTERSECTION_BOX_BOX_HPP +#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTION_BOX_BOX_IMPLEMENTATION_HPP diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/gc.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/gc.hpp index fa492c0f34..38a10ba328 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/gc.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/intersection/gc.hpp @@ -12,6 +12,8 @@ #include <tuple> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/detail/gc_make_rtree.hpp> #include <boost/geometry/algorithms/detail/intersection/interface.hpp> #include <boost/geometry/views/detail/geometry_collection_view.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp index 5af933de85..8b55ee85df 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp @@ -20,7 +20,6 @@ #include <boost/iterator/filter_iterator.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> -#include <boost/range/size.hpp> #include <boost/range/value_type.hpp> #include <boost/geometry/core/exterior_ring.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/ring.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/ring.hpp index e34f02f7f6..810b94a453 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/ring.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/is_valid/ring.hpp @@ -15,6 +15,8 @@ #include <deque> +#include <boost/range/size.hpp> + #include <boost/core/ignore_unused.hpp> #include <boost/geometry/core/closure.hpp> @@ -38,12 +40,11 @@ #include <boost/geometry/algorithms/detail/is_valid/has_valid_self_turns.hpp> #include <boost/geometry/algorithms/dispatch/is_valid.hpp> -// TEMP - with UmberllaStrategy this will be not needed +// TEMP - with UmbrellaStrategy this will be not needed #include <boost/geometry/strategy/area.hpp> #include <boost/geometry/strategies/area/services.hpp> // TODO: use point_order instead of area - #ifdef BOOST_GEOMETRY_TEST_DEBUG #include <boost/geometry/io/dsv/write.hpp> #endif diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp index a21ee9832b..c52266c190 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp @@ -100,7 +100,7 @@ inline void append_no_dups_or_spikes(Range& range, Point const& point, return; } - auto append = [](auto& r, const auto& p) + auto append = [](auto& r, auto const& p) { using point_t = typename boost::range_value<Range>::type; point_t rp; @@ -168,56 +168,64 @@ inline void append_no_collinear(Range& range, Point const& point, } } -template <typename Range, typename Strategy, typename RobustPolicy> -inline void clean_closing_dups_and_spikes(Range& range, - Strategy const& strategy, - RobustPolicy const& robust_policy) +// Should only be called internally, from traverse. +template <typename Ring, typename Strategy, typename RobustPolicy> +inline void remove_spikes_at_closure(Ring& ring, Strategy const& strategy, + RobustPolicy const& robust_policy) { - std::size_t const minsize - = core_detail::closure::minimum_ring_size - < - geometry::closure<Range>::value - >::value; - - if (boost::size(range) <= minsize) + // It assumes a closed ring (whatever the closure value) + constexpr std::size_t min_size + = core_detail::closure::minimum_ring_size + < + geometry::closed + >::value; + + if (boost::size(ring) < min_size) { + // Don't act on too small rings. return; } - static bool const closed = geometry::closure<Range>::value == geometry::closed; - -// TODO: the following algorithm could be rewritten to first look for spikes -// and then erase some number of points from the beginning of the Range - bool found = false; do { found = false; - auto first = boost::begin(range); - auto second = first + 1; - auto ultimate = boost::end(range) - 1; - if (BOOST_GEOMETRY_CONDITION(closed)) - { - ultimate--; - } + auto const first = boost::begin(ring); + auto const second = first + 1; + auto const penultimate = boost::end(ring) - 2; // Check if closing point is a spike (this is so if the second point is // considered as collinear w.r.t. the last segment) - if (point_is_collinear(*second, *ultimate, *first, + if (point_is_collinear(*second, *penultimate, *first, strategy.side(), // TODO: Pass strategy? robust_policy)) { - range::erase(range, first); - if (BOOST_GEOMETRY_CONDITION(closed)) - { - // Remove closing last point - range::resize(range, boost::size(range) - 1); - // Add new closing point - range::push_back(range, range::front(range)); - } + // Remove first point and last point + range::erase(ring, first); + range::resize(ring, boost::size(ring) - 1); + // Close the ring again + range::push_back(ring, range::front(ring)); + found = true; } - } while(found && boost::size(range) > minsize); + } while (found && boost::size(ring) >= min_size); +} + +template <typename Ring, typename Strategy> +inline void fix_closure(Ring& ring, Strategy const& strategy) +{ + if (BOOST_GEOMETRY_CONDITION(geometry::closure<Ring>::value == geometry::open)) + { + if (! boost::empty(ring) + && detail::equals::equals_point_point(range::front(ring), range::back(ring), strategy)) + { + // Correct closure: traversal automatically closes rings. + // Depending on the geometric configuration, + // remove_spikes_at_closure can remove the closing point. + // But it does not always do that. Therefore it is corrected here explicitly. + range::resize(ring, boost::size(ring) - 1); + } + } } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/approximately_equals.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/approximately_equals.hpp index 1f41085dc1..f41996f1dc 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/approximately_equals.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/approximately_equals.hpp @@ -21,6 +21,31 @@ namespace boost { namespace geometry namespace detail { namespace overlay { +// Value for approximately_equals used by get_cluster and sort_by_side +// This is an "epsilon_multiplier" and, therefore, multiplied the epsilon +// belonging to the used floating point type with this value. +template <typename T> +struct common_approximately_equals_epsilon_multiplier +{ + static T value() + { + // The value is (a bit) arbitrary. For sort_by_side it should be large + // enough to not take a point which is too close by, to calculate the + // side value correctly. For get_cluster it is arbitrary as well, points + // close to each other should form a cluster, which is also important + // for subsequent side calculations. Points too far apart should not be + // clustered. + // + // The value of 100 is currently considered as a sweet spot. + // If the value changes (as of 2023-09-13): + // 10: too small, failing unit test(s): + // - union: issue_1108 + // 50: this would be fine, no tests failing + // 1000: this would be fine, no tests failing + return T(100); + } +}; + template <typename Point1, typename Point2, typename E> inline bool approximately_equals(Point1 const& a, Point2 const& b, E const& epsilon_multiplier) diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp index fb3ee1bef2..578ba090cf 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp @@ -362,7 +362,7 @@ inline void assign_parents(Geometry1 const& geometry1, } else if (info.parent.source_index >= 0) { - const ring_info_type& parent = ring_map[info.parent]; + ring_info_type const& parent = ring_map[info.parent]; bool const pos = math::larger(info.get_area(), 0); bool const parent_pos = math::larger(parent.area, 0); diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp index 49d190bd0c..39d107e013 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp @@ -20,7 +20,6 @@ #include <boost/range/end.hpp> #include <boost/range/value_type.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp> #include <boost/geometry/algorithms/detail/has_self_intersections.hpp> #if defined(BOOST_GEOMETRY_DEBUG_INTERSECTION) || defined(BOOST_GEOMETRY_OVERLAY_REPORT_WKT) diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/cluster_exits.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/cluster_exits.hpp index 8c4f4c7f31..b1c7de217d 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/cluster_exits.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/cluster_exits.hpp @@ -20,7 +20,6 @@ #include <boost/range/value_type.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp> #include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp index 06d6e7bd61..6d04f0a098 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp @@ -62,14 +62,14 @@ struct cluster_colocator<Point, CoordinateType, geometry::cartesian_tag, false> { CoordinateType centroid_0 = 0; CoordinateType centroid_1 = 0; - for (const auto& index : indices) + for (auto const& index : indices) { centroid_0 += geometry::get<0>(turns[index].point); centroid_1 += geometry::get<1>(turns[index].point); } centroid_0 /= indices.size(); centroid_1 /= indices.size(); - for (const auto& index : indices) + for (auto const& index : indices) { geometry::set<0>(turns[index].point, centroid_0); geometry::set<1>(turns[index].point, centroid_1); @@ -86,14 +86,14 @@ inline void colocate_clusters(Clusters const& clusters, Turns& turns) { for (auto const& pair : clusters) { - auto const& indices = pair.second.turn_indices; - if (indices.size() < 2) + auto const& turn_indices = pair.second.turn_indices; + if (turn_indices.size() < 2) { // Defensive check continue; } - using point_t = decltype(turns[*indices.begin()].point); - cluster_colocator<point_t>::apply(indices, turns); + using point_t = decltype(turns[*turn_indices.begin()].point); + cluster_colocator<point_t>::apply(turn_indices, turns); } } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp index 258a815f09..ca537e0815 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp @@ -114,7 +114,7 @@ inline void discard_duplicate_start_turns(Turns& turns, { if (turn.method == method_start) { - for (const auto& op : turn.operations) + for (auto const& op : turn.operations) { start_turns_per_segment[adapt_id(op.seg_id)].push_back(index); } @@ -130,7 +130,7 @@ inline void discard_duplicate_start_turns(Turns& turns, // Also avoid comparing "start" with itself. if (turn.method != method_crosses && turn.method != method_start) { - for (const auto& op : turn.operations) + for (auto const& op : turn.operations) { auto it = start_turns_per_segment.find(adapt_id(op.seg_id)); if (it != start_turns_per_segment.end()) diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp index b94bba6c5a..962c68be69 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp @@ -185,7 +185,8 @@ inline void enrich_assign(Operations& operations, Turns& turns, << " nxt=" << op.enriched.next_ip_index << " / " << op.enriched.travels_to_ip_index << " [vx " << op.enriched.travels_to_vertex_index << "]" - << (turns[indexed_op.turn_index].discarded ? " discarded" : "") + << (turns[indexed_op.turn_index].discarded ? " [discarded]" : "") + << (op.enriched.startable ? "" : " [not startable]") << std::endl; } #endif diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp index 2747fa68ba..5d6badfd5c 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp @@ -35,28 +35,24 @@ namespace detail { namespace overlay template <typename Tag = no_rescale_policy_tag, bool Integral = false> struct sweep_equal_policy { -private: - template <typename T> - static inline T threshold() - { - // Points within some epsilons are considered as equal. - return T(100); - } + public: - // Returns true if point are considered equal (within an epsilon) + // Returns true if point are considered equal template <typename P> static inline bool equals(P const& p1, P const& p2) { using coor_t = typename coordinate_type<P>::type; - return approximately_equals(p1, p2, threshold<coor_t>()); + static auto const tolerance + = common_approximately_equals_epsilon_multiplier<coor_t>::value(); + return approximately_equals(p1, p2, tolerance); } template <typename T> static inline bool exceeds(T value) { - // This threshold is an arbitrary value - // as long as it is bigger than the used value above - T const limit = T(1) / threshold<T>(); + static auto const tolerance + = common_approximately_equals_epsilon_multiplier<T>::value(); + T const limit = T(1) / tolerance; return value > limit; } }; diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp index d462bb524d..81a9418a82 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp @@ -78,7 +78,7 @@ struct get_distance_measure<CalculationType, spherical_tag> static result_type apply(SegmentPoint const& , SegmentPoint const& , Point const& ) { - const result_type result; + result_type const result; return result; } }; @@ -125,7 +125,7 @@ inline auto get_distance_measure(SegmentPoint const& p1, SegmentPoint const& p2, // Verify equality, without using a tolerance // (so don't use equals or equals_point_point) // because it is about very tiny differences. - auto identical = [](const auto& point1, const auto& point2) + auto identical = [](auto const& point1, auto const& point2) { return geometry::get<0>(point1) == geometry::get<0>(point2) && geometry::get<1>(point1) == geometry::get<1>(point2); diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp index 80c4ae2d38..0fa6bdbd1b 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -1,6 +1,6 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) +// Boost.Geometry -// Copyright (c) 2007-2021 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2007-2023 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. // This file was modified by Oracle on 2015-2022. @@ -46,10 +46,7 @@ public: message += method; } - virtual ~turn_info_exception() - {} - - virtual char const* what() const noexcept + virtual char const* What() const noexcept { return message.c_str(); } @@ -592,7 +589,7 @@ struct touch : public base_turn_handler // >----->P qj is LEFT of P1 and pi is LEFT of Q2 // (the other way round is also possible) - auto has_distance = [&](const auto& r1, const auto& r2) -> bool + auto has_distance = [&](auto const& r1, auto const& r2) -> bool { auto const d1 = get_distance_measure(r1.at(0), r1.at(1), r2.at(1), umbrella_strategy); auto const d2 = get_distance_measure(r2.at(1), r2.at(2), r1.at(0), umbrella_strategy); @@ -855,24 +852,15 @@ struct equal : public base_turn_handler int const side_pk_p = has_pk ? side.pk_wrt_p1() : 0; int const side_qk_p = has_qk ? side.qk_wrt_p1() : 0; - if (BOOST_GEOMETRY_CONDITION(VerifyPolicy::use_side_verification) - && has_pk && has_qk && side_pk_p == side_qk_p) + if (has_pk && has_qk && side_pk_p == side_qk_p) { // They turn to the same side, or continue both collinearly - // Without rescaling, to check for union/intersection, - // try to check side values (without any thresholds) - auto const dm_pk_q2 - = get_distance_measure(range_q.at(1), range_q.at(2), range_p.at(2), - umbrella_strategy); - auto const dm_qk_p2 - = get_distance_measure(range_p.at(1), range_p.at(2), range_q.at(2), - umbrella_strategy); - - if (dm_qk_p2.measure != dm_pk_q2.measure) + // To check for union/intersection, try to check side values + int const side_qk_p2 = side.qk_wrt_p2(); + + if (opposite(side_qk_p2, side_pk_q2)) { - // A (possibly very small) difference is detected, which - // can be used to distinguish between union/intersection - ui_else_iu(dm_qk_p2.measure < dm_pk_q2.measure, ti); + ui_else_iu(side_pk_q2 == 1, ti); return; } } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp index 76d7faf6de..90e4d0d063 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp @@ -696,7 +696,7 @@ struct get_turn_info_linear_areal namespace ov = overlay; typedef ov::get_turn_info_for_endpoint<EnableFirst, EnableLast> get_info_e; - const std::size_t ip_count = inters.i_info().count; + std::size_t const ip_count = inters.i_info().count; // no intersection points if (ip_count == 0) { diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp index 326c883b39..b6f8983e31 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp @@ -39,7 +39,6 @@ #include <boost/geometry/algorithms/detail/sections/section_functions.hpp> #include <boost/geometry/algorithms/detail/sections/sectionalize.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/coordinate_dimension.hpp> #include <boost/geometry/core/exterior_ring.hpp> @@ -669,10 +668,6 @@ struct get_turns_cs // into account (not in the iterator, nor in the retrieve policy) iterator_type it = boost::begin(view); - //bool first = true; - - //char previous_side[2] = {0, 0}; - signed_size_type index = 0; for (iterator_type prev = it++; @@ -684,64 +679,19 @@ struct get_turns_cs unique_sub_range_from_view_policy view_unique_sub_range(view, *prev, *it, it); - /*if (first) - { - previous_side[0] = get_side<0>(box, *prev); - previous_side[1] = get_side<1>(box, *prev); - } - - char current_side[2]; - current_side[0] = get_side<0>(box, *it); - current_side[1] = get_side<1>(box, *it); - - // There can NOT be intersections if - // 1) EITHER the two points are lying on one side of the box (! 0 && the same) - // 2) OR same in Y-direction - // 3) OR all points are inside the box (0) - if (! ( - (current_side[0] != 0 && current_side[0] == previous_side[0]) - || (current_side[1] != 0 && current_side[1] == previous_side[1]) - || (current_side[0] == 0 - && current_side[1] == 0 - && previous_side[0] == 0 - && previous_side[1] == 0) - ) - )*/ - if (true) - { - get_turns_with_box(seg_id, source_id2, - view_unique_sub_range, - box_points, - intersection_strategy, - robust_policy, - turns, - interrupt_policy); - // Future performance enhancement: - // return if told by the interrupt policy - } + get_turns_with_box(seg_id, source_id2, + view_unique_sub_range, + box_points, + intersection_strategy, + robust_policy, + turns, + interrupt_policy); + // Future performance enhancement: + // return if told by the interrupt policy } } private: - template<std::size_t Index, typename Point> - static inline int get_side(Box const& box, Point const& point) - { - // Inside -> 0 - // Outside -> -1 (left/below) or 1 (right/above) - // On border -> -2 (left/lower) or 2 (right/upper) - // The only purpose of the value is to not be the same, - // and to denote if it is inside (0) - - typename coordinate_type<Point>::type const& c = get<Index>(point); - typename coordinate_type<Box>::type const& left = get<min_corner, Index>(box); - typename coordinate_type<Box>::type const& right = get<max_corner, Index>(box); - - if (geometry::math::equals(c, left)) return -2; - else if (geometry::math::equals(c, right)) return 2; - else if (c < left) return -1; - else if (c > right) return 1; - else return 0; - } template < diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp index aaabb4a4df..b41697477d 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp @@ -296,7 +296,7 @@ inline void assign_cluster_ids(Turns& turns, Clusters const& clusters) } for (auto const& kv : clusters) { - for (const auto& index : kv.second.turn_indices) + for (auto const& index : kv.second.turn_indices) { turns[index].cluster_id = kv.first; } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp index 435a80c272..3d7ea5eb32 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp @@ -128,7 +128,7 @@ private : template <typename Turns, typename Clusters> static inline bool is_self_cluster(signed_size_type cluster_id, - const Turns& turns, Clusters const& clusters) + Turns const& turns, Clusters const& clusters) { auto cit = clusters.find(cluster_id); if (cit == clusters.end()) diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/inconsistent_turns_exception.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/inconsistent_turns_exception.hpp index 2782a8bc2c..4f91c054ad 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/inconsistent_turns_exception.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/inconsistent_turns_exception.hpp @@ -22,10 +22,7 @@ public: inline inconsistent_turns_exception() {} - virtual ~inconsistent_turns_exception() - {} - - virtual char const* what() const noexcept + char const* what() const noexcept override { return "Boost.Geometry Inconsistent Turns exception"; } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp index e41ee8238c..4fd69411d0 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp @@ -13,7 +13,6 @@ #include <boost/geometry/algorithms/detail/covered_by/implementation.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/tags.hpp> #include <boost/geometry/iterators/point_iterator.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp index 20369fa95a..1883e1df21 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp @@ -24,7 +24,6 @@ #include <boost/geometry/algorithms/detail/overlay/get_turns.hpp> #include <boost/geometry/algorithms/detail/sections/section_box_policies.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/coordinate_dimension.hpp> #include <boost/geometry/core/point_order.hpp> #include <boost/geometry/core/tags.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp index 503b36720a..7e31a9fa9d 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp @@ -89,7 +89,7 @@ struct ranked_point struct less_by_turn_index { template <typename T> - inline bool operator()(const T& first, const T& second) const + inline bool operator()(T const& first, T const& second) const { return first.turn_index == second.turn_index ? first.index < second.index @@ -101,7 +101,7 @@ struct less_by_turn_index struct less_by_index { template <typename T> - inline bool operator()(const T& first, const T& second) const + inline bool operator()(T const& first, T const& second) const { // Length might be considered too // First order by from/to @@ -123,7 +123,7 @@ struct less_by_index struct less_false { template <typename T> - inline bool operator()(const T&, const T& ) const + inline bool operator()(T const&, T const& ) const { return false; } @@ -132,14 +132,14 @@ struct less_false template <typename PointOrigin, typename PointTurn, typename SideStrategy, typename LessOnSame, typename Compare> struct less_by_side { - less_by_side(const PointOrigin& p1, const PointTurn& p2, SideStrategy const& strategy) + less_by_side(PointOrigin const& p1, PointTurn const& p2, SideStrategy const& strategy) : m_origin(p1) , m_turn_point(p2) , m_strategy(strategy) {} template <typename T> - inline bool operator()(const T& first, const T& second) const + inline bool operator()(T const& first, T const& second) const { typedef typename SideStrategy::cs_tag cs_tag; @@ -325,7 +325,8 @@ public : double >::type; - ct_type const tolerance = 1000000000; + static auto const tolerance + = common_approximately_equals_epsilon_multiplier<ct_type>::value(); int offset = 0; while (approximately_equals(point_from, turn.point, tolerance) @@ -417,7 +418,7 @@ public : for (std::size_t i = 0; i < m_ranked_points.size(); i++) { - const rp& ranked = m_ranked_points[i]; + rp const& ranked = m_ranked_points[i]; if (ranked.direction != dir_from) { continue; @@ -439,7 +440,7 @@ public : bool handled[2] = {false, false}; for (std::size_t i = 0; i < m_ranked_points.size(); i++) { - const rp& ranked = m_ranked_points[i]; + rp const& ranked = m_ranked_points[i]; if (ranked.direction != dir_from) { continue; diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal.hpp index 22ae1a2de8..82cfb86a83 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal.hpp @@ -26,7 +26,6 @@ #include <boost/geometry/algorithms/detail/overlay/is_self_turn.hpp> #include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp> #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/util/condition.hpp> @@ -505,7 +504,7 @@ public : } inline - bool select_operation(const turn_type& turn, + bool select_operation(turn_type const& turn, signed_size_type turn_index, signed_size_type start_turn_index, segment_identifier const& previous_seg_id, @@ -536,7 +535,7 @@ public : return result; } - inline int starting_operation_index(const turn_type& turn) const + inline int starting_operation_index(turn_type const& turn) const { for (int i = 0; i < 2; i++) { @@ -548,7 +547,7 @@ public : return -1; } - inline bool both_finished(const turn_type& turn) const + inline bool both_finished(turn_type const& turn) const { for (int i = 0; i < 2; i++) { diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp index 3764cce0a6..692de7345a 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp @@ -16,13 +16,13 @@ #include <cstddef> #include <boost/range/value_type.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp> #include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp> #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp> #include <boost/geometry/algorithms/detail/overlay/traversal.hpp> #include <boost/geometry/algorithms/num_points.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/closure.hpp> @@ -149,8 +149,8 @@ struct traversal_ring_creator { // Check operation (TODO: this might be redundant or should be catched before) - const turn_type& current_turn = m_turns[turn_index]; - const turn_operation_type& op = current_turn.operations[op_index]; + turn_type const& current_turn = m_turns[turn_index]; + turn_operation_type const& op = current_turn.operations[op_index]; if (op.visited.finalized() || m_trav.is_visited(current_turn, op, turn_index, op_index)) { @@ -274,6 +274,9 @@ struct traversal_ring_creator if (traverse_error == traverse_error_none) { + remove_spikes_at_closure(ring, m_strategy, m_robust_policy); + fix_closure(ring, m_strategy); + std::size_t const min_num_points = core_detail::closure::minimum_ring_size < @@ -282,7 +285,6 @@ struct traversal_ring_creator if (geometry::num_points(ring) >= min_num_points) { - clean_closing_dups_and_spikes(ring, m_strategy, m_robust_policy); rings.push_back(ring); m_trav.finalize_visit_info(m_turn_info_map); diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp index be0f2bcd87..1858c9ec2a 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp @@ -21,7 +21,11 @@ #include <boost/geometry/algorithms/detail/overlay/cluster_info.hpp> #include <boost/geometry/algorithms/detail/overlay/is_self_turn.hpp> #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp> + +#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR) #include <boost/geometry/core/access.hpp> +#endif + #include <boost/geometry/util/condition.hpp> #include <cstddef> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traverse.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traverse.hpp index 710cea09e9..d56b6b1b2a 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traverse.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/overlay/traverse.hpp @@ -11,6 +11,8 @@ #include <cstddef> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp> #include <boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp> #include <boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp index 0d95aabac1..91f4dac5b0 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/boundary_checker.hpp @@ -13,6 +13,7 @@ #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_BOUNDARY_CHECKER_HPP #include <boost/core/ignore_unused.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/detail/equals/point_point.hpp> #include <boost/geometry/algorithms/detail/sub_range.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp index cb1f0f40c9..39d27da01e 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp @@ -18,6 +18,7 @@ #include <vector> #include <boost/core/ignore_unused.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp> #include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp> @@ -98,7 +99,7 @@ struct for_each_disjoint_geometry_if<OpId, Geometry, Tag, true> { BOOST_GEOMETRY_ASSERT(first != last); - const std::size_t count = boost::size(geometry); + std::size_t const count = boost::size(geometry); // O(I) // gather info about turns generated for contained geometries @@ -229,8 +230,8 @@ private: template <typename TurnInfo, std::size_t OpId> class exit_watcher { - static const std::size_t op_id = OpId; - static const std::size_t other_op_id = (OpId + 1) % 2; + static std::size_t const op_id = OpId; + static std::size_t const other_op_id = (OpId + 1) % 2; typedef typename TurnInfo::point_type point_type; typedef detail::relate::point_info<point_type> point_info; diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/point_point.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/point_point.hpp index c987bb44cb..9e8ccaca23 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/point_point.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/point_point.hpp @@ -19,6 +19,7 @@ #include <vector> #include <boost/range/empty.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/detail/equals/point_point.hpp> #include <boost/geometry/algorithms/detail/within/point_in_geometry.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/topology_check.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/topology_check.hpp index 2fc31ab51b..90f1ebd52f 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/topology_check.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/relate/topology_check.hpp @@ -12,6 +12,7 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_TOPOLOGY_CHECK_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_TOPOLOGY_CHECK_HPP +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/detail/equals/point_point.hpp> #include <boost/geometry/algorithms/not_implemented.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp index f321b40b2a..fd029db1b3 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp @@ -21,7 +21,6 @@ #include <boost/range/size.hpp> #include <boost/range/value_type.hpp> -#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/closure.hpp> #include <boost/geometry/core/exterior_ring.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_frechet_distance.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_frechet_distance.hpp index 094ae14a3b..c84ec99b40 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_frechet_distance.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_frechet_distance.hpp @@ -22,6 +22,8 @@ #include <vector> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/detail/dummy_geometries.hpp> #include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp> #include <boost/geometry/algorithms/not_implemented.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp index 115909c06a..9e08c761ae 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp @@ -26,6 +26,8 @@ #include <vector> #include <limits> +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/detail/dummy_geometries.hpp> #include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp> #include <boost/geometry/algorithms/not_implemented.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/is_convex.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/is_convex.hpp index afde6453f5..c5aef2ecbf 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/is_convex.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/algorithms/is_convex.hpp @@ -16,6 +16,7 @@ #include <boost/range/empty.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/detail/equals/point_point.hpp> #include <boost/geometry/algorithms/detail/dummy_geometries.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/arithmetic/infinite_line_functions.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/arithmetic/infinite_line_functions.hpp index 529e83716b..16acb866c5 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/arithmetic/infinite_line_functions.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/arithmetic/infinite_line_functions.hpp @@ -97,7 +97,7 @@ side_value(model::infinite_line<Type> const& line, Point const& p) } template <typename Type> -inline bool is_degenerate(const model::infinite_line<Type>& line) +inline bool is_degenerate(model::infinite_line<Type> const& line) { static Type const zero = 0; return math::equals(line.a, zero) && math::equals(line.b, zero); diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/core/exception.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/core/exception.hpp index a81af0bce2..2dbd298ca4 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/core/exception.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/core/exception.hpp @@ -33,7 +33,7 @@ namespace boost { namespace geometry class exception : public std::exception { public: - virtual char const* what() const noexcept + char const* what() const noexcept override { return "Boost.Geometry exception"; } @@ -52,7 +52,7 @@ public: inline invalid_input_exception() {} - virtual char const* what() const noexcept + char const* what() const noexcept override { return "Boost.Geometry Invalid-Input exception"; } @@ -96,7 +96,7 @@ public: inline invalid_output_exception() {} - virtual char const* what() const noexcept + char const* what() const noexcept override { return "Boost.Geometry Invalid-Output exception"; } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/formulas/karney_inverse.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/formulas/karney_inverse.hpp index 47efc9ff5e..12dd2b2598 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/formulas/karney_inverse.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/formulas/karney_inverse.hpp @@ -32,6 +32,7 @@ #define BOOST_GEOMETRY_FORMULAS_KARNEY_INVERSE_HPP +#include <boost/core/invoke_swap.hpp> #include <boost/math/constants/constants.hpp> #include <boost/math/special_functions/hypot.hpp> @@ -191,7 +192,7 @@ public: if (swap_point < 0) { lon12_sign *= -1; - swap(lat1, lat2); + boost::core::invoke_swap(lat1, lat2); } // Enforce lat1 to be <= 0. @@ -448,9 +449,9 @@ public: if (swap_point < 0) { - swap(sin_alpha1, sin_alpha2); - swap(cos_alpha1, cos_alpha2); - swap(result.geodesic_scale, M21); + boost::core::invoke_swap(sin_alpha1, sin_alpha2); + boost::core::invoke_swap(cos_alpha1, cos_alpha2); + boost::core::invoke_swap(result.geodesic_scale, M21); } sin_alpha1 *= swap_point * lon12_sign; diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/intersection_content.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/intersection_content.hpp index 1a2cd28bc0..260af9eca5 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/intersection_content.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/intersection_content.hpp @@ -16,7 +16,7 @@ #define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP #include <boost/geometry/algorithms/detail/disjoint/box_box.hpp> -#include <boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp> +#include <boost/geometry/algorithms/detail/intersection/box_box_implementation.hpp> #include <boost/geometry/index/detail/algorithms/content.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/path_intersection.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/path_intersection.hpp index 831efe5046..afa203e1e3 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/path_intersection.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/algorithms/path_intersection.hpp @@ -27,6 +27,10 @@ #include <boost/geometry/strategies/default_distance_result.hpp> #include <boost/geometry/strategies/default_length_result.hpp> +#include <boost/range/begin.hpp> +#include <boost/range/end.hpp> +#include <boost/range/size.hpp> +#include <boost/range/value_type.hpp> namespace boost { namespace geometry { namespace index { namespace detail { diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp index c545a4160a..ba0fd7c9ac 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp @@ -16,8 +16,10 @@ #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP +#include <utility> #include <boost/container/allocator_traits.hpp> #include <boost/container/vector.hpp> +#include <boost/core/invoke_swap.hpp> #include <boost/core/pointer_traits.hpp> #include <boost/variant/static_visitor.hpp> #include <boost/variant/variant.hpp> @@ -184,7 +186,7 @@ public: void swap(allocators & a) { - boost::swap(node_allocator(), a.node_allocator()); + boost::core::invoke_swap(node_allocator(), a.node_allocator()); } bool operator==(allocators const& a) const { return node_allocator() == a.node_allocator(); } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_static.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_static.hpp index c1612b9853..e0150a7033 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_static.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/rtree/node/variant_static.hpp @@ -15,6 +15,12 @@ #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_STATIC_HPP #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_STATIC_HPP +#include <utility> +#include <boost/container/allocator_traits.hpp> +#include <boost/core/invoke_swap.hpp> +#include <boost/variant/static_visitor.hpp> +#include <boost/variant/variant.hpp> + #include <boost/geometry/index/detail/rtree/node/variant_dynamic.hpp> #include <boost/geometry/index/detail/varray.hpp> @@ -146,7 +152,7 @@ public: void swap(allocators & a) { - boost::swap(node_allocator(), a.node_allocator()); + boost::core::invoke_swap(node_allocator(), a.node_allocator()); } bool operator==(allocators const& a) const { return node_allocator() == a.node_allocator(); } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/utilities.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/utilities.hpp index 9060071b33..afe122904b 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/utilities.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/utilities.hpp @@ -12,7 +12,7 @@ #include <type_traits> -#include <boost/core/swap.hpp> +#include <boost/core/invoke_swap.hpp> #ifndef BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP #define BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP @@ -40,7 +40,7 @@ static inline void move_cond(T &, T &, std::false_type) {} template <typename T> inline void swap_cond(T & l, T & r, std::true_type) { - ::boost::swap(l, r); + ::boost::core::invoke_swap(l, r); } template <typename T> inline diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/varray.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/varray.hpp index 9911520bbb..4d010cb828 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/varray.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/index/detail/varray.hpp @@ -21,7 +21,6 @@ #include <boost/concept_check.hpp> #include <boost/config.hpp> #include <boost/core/ignore_unused.hpp> -#include <boost/core/swap.hpp> #include <boost/integer.hpp> // TODO - use std::reverse_iterator and std::iterator_traits @@ -1566,7 +1565,6 @@ private: { //std::iter_swap(first_sm, first_la); //std::swap(*first_sm, *first_la); // may throw - //boost::swap(*first_sm, *first_la); value_type temp(std::move(*first_sm)); // may throw *first_sm = std::move(*first_la); // may throw *first_la = std::move(temp); // may throw diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/index/rtree.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/index/rtree.hpp index 425dae965a..584a77624b 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/index/rtree.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/index/rtree.hpp @@ -24,6 +24,7 @@ // Boost #include <boost/container/new_allocator.hpp> #include <boost/tuple/tuple.hpp> +#include <boost/core/invoke_swap.hpp> // Boost.Geometry #include <boost/geometry/core/static_assert.hpp> @@ -657,9 +658,9 @@ public: src.m_members.parameters(), std::move(src.m_members.allocators())) { - boost::swap(m_members.values_count, src.m_members.values_count); - boost::swap(m_members.leafs_level, src.m_members.leafs_level); - boost::swap(m_members.root, src.m_members.root); + boost::core::invoke_swap(m_members.values_count, src.m_members.values_count); + boost::core::invoke_swap(m_members.leafs_level, src.m_members.leafs_level); + boost::core::invoke_swap(m_members.root, src.m_members.root); } /*! @@ -683,9 +684,9 @@ public: { if ( src.m_members.allocators() == allocator ) { - boost::swap(m_members.values_count, src.m_members.values_count); - boost::swap(m_members.leafs_level, src.m_members.leafs_level); - boost::swap(m_members.root, src.m_members.root); + boost::core::invoke_swap(m_members.values_count, src.m_members.values_count); + boost::core::invoke_swap(m_members.leafs_level, src.m_members.leafs_level); + boost::core::invoke_swap(m_members.root, src.m_members.root); } else { @@ -758,9 +759,9 @@ public: m_members.equal_to() = src.m_members.equal_to(); m_members.parameters() = src.m_members.parameters(); - boost::swap(m_members.values_count, src.m_members.values_count); - boost::swap(m_members.leafs_level, src.m_members.leafs_level); - boost::swap(m_members.root, src.m_members.root); + boost::core::invoke_swap(m_members.values_count, src.m_members.values_count); + boost::core::invoke_swap(m_members.leafs_level, src.m_members.leafs_level); + boost::core::invoke_swap(m_members.root, src.m_members.root); // NOTE: if propagate is true for std allocators on darwin 4.2.1, glibc++ // (allocators stored as base classes of members_holder) @@ -795,9 +796,9 @@ public: */ void swap(rtree & other) { - boost::swap(m_members.indexable_getter(), other.m_members.indexable_getter()); - boost::swap(m_members.equal_to(), other.m_members.equal_to()); - boost::swap(m_members.parameters(), other.m_members.parameters()); + boost::core::invoke_swap(m_members.indexable_getter(), other.m_members.indexable_getter()); + boost::core::invoke_swap(m_members.equal_to(), other.m_members.equal_to()); + boost::core::invoke_swap(m_members.parameters(), other.m_members.parameters()); // NOTE: if propagate is true for std allocators on darwin 4.2.1, glibc++ // (allocators stored as base classes of members_holder) @@ -808,9 +809,9 @@ public: > propagate; detail::swap_cond(m_members.allocators(), other.m_members.allocators(), propagate()); - boost::swap(m_members.values_count, other.m_members.values_count); - boost::swap(m_members.leafs_level, other.m_members.leafs_level); - boost::swap(m_members.root, other.m_members.root); + boost::core::invoke_swap(m_members.values_count, other.m_members.values_count); + boost::core::invoke_swap(m_members.leafs_level, other.m_members.leafs_level); + boost::core::invoke_swap(m_members.root, other.m_members.root); } /*! diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/io/dsv/write.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/io/dsv/write.hpp index 5870d21c58..e8b257a93a 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/io/dsv/write.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/io/dsv/write.hpp @@ -27,6 +27,7 @@ #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/value_type.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/core/exterior_ring.hpp> #include <boost/geometry/core/interior_rings.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/io/wkt/read.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/io/wkt/read.hpp index 047be6fbf2..5bbfd235c2 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/io/wkt/read.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/io/wkt/read.hpp @@ -96,9 +96,7 @@ struct read_wkt_exception : public geometry::exception complete = message + "' in (" + wkt.substr(0, 100) + ")"; } - virtual ~read_wkt_exception() {} - - virtual const char* what() const noexcept + const char* what() const noexcept override { return complete.c_str(); } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/rescale_policy.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/rescale_policy.hpp index 9394f8d9d4..7d6ad7e9fa 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/rescale_policy.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/rescale_policy.hpp @@ -5,9 +5,10 @@ // Copyright (c) 2014-2015 Mateusz Loskot, London, UK. // Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland. -// This file was modified by Oracle on 2015, 2018. -// Modifications copyright (c) 2015-2018, Oracle and/or its affiliates. +// This file was modified by Oracle on 2015, 2023. +// Modifications copyright (c) 2015-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 // Use, modification and distribution is subject to the Boost Software License, @@ -19,6 +20,7 @@ #include <cstddef> +#include <boost/geometry/core/access.hpp> #include <boost/geometry/core/coordinate_type.hpp> #include <boost/geometry/policies/robustness/segment_ratio.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/segment_ratio.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/segment_ratio.hpp index 9a3914a756..5a75fad014 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/segment_ratio.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/policies/robustness/segment_ratio.hpp @@ -153,7 +153,7 @@ public: , m_approximation(0) {} - inline segment_ratio(const Type& numerator, const Type& denominator) + inline segment_ratio(Type const& numerator, Type const& denominator) : m_numerator(numerator) , m_denominator(denominator) { @@ -207,7 +207,7 @@ public: inline Type const& numerator() const { return m_numerator; } inline Type const& denominator() const { return m_denominator; } - inline void assign(const Type& numerator, const Type& denominator) + inline void assign(Type const& numerator, Type const& denominator) { m_numerator = numerator; m_denominator = denominator; diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/centroid_average.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/centroid_average.hpp index 103a1d8ab3..a382a2fbd4 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/centroid_average.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/centroid_average.hpp @@ -3,7 +3,7 @@ // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. -// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. +// Copyright (c) 2017-2023 Adam Wulkiewicz, Lodz, Poland. // This file was modified by Oracle on 2015-2021. // Modifications copyright (c) 2015-2021 Oracle and/or its affiliates. @@ -89,7 +89,8 @@ public : centroid = state.centroid; if ( state.count > 0 ) { - divide_value(centroid, state.count); + using coord_t = typename coordinate_type<ResultPoint>::type; + divide_value(centroid, static_cast<coord_t>(state.count)); return true; } return false; diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/side_rounded_input.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/side_rounded_input.hpp index fc1543008f..9283a2b845 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/side_rounded_input.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/strategies/cartesian/side_rounded_input.hpp @@ -47,7 +47,7 @@ struct side_rounded_input coor_t const p_x = geometry::get<0>(p); coor_t const p_y = geometry::get<1>(p); - constexpr coor_t eps = std::numeric_limits<coor_t>::epsilon() / 2; + static coor_t const eps = std::numeric_limits<coor_t>::epsilon() / 2; coor_t const det = (p1_x - p_x) * (p2_y - p_y) - (p1_y - p_y) * (p2_x - p_x); coor_t const err_bound = (Coeff1 * eps + Coeff2 * eps * eps) * ( (geometry::math::abs(p1_x) + geometry::math::abs(p_x)) diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/strategy/spherical/envelope_range.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/strategy/spherical/envelope_range.hpp index 8833bd8ea3..e9f5ba2188 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/strategy/spherical/envelope_range.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/strategy/spherical/envelope_range.hpp @@ -10,6 +10,8 @@ #ifndef BOOST_GEOMETRY_STRATEGY_SPHERICAL_ENVELOPE_RANGE_HPP #define BOOST_GEOMETRY_STRATEGY_SPHERICAL_ENVELOPE_RANGE_HPP +#include <boost/range/size.hpp> + #include <boost/geometry/algorithms/assign.hpp> #include <boost/geometry/algorithms/detail/envelope/initialize.hpp> #include <boost/geometry/geometries/segment.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/util/math.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/util/math.hpp index c88572ed53..edd0f412c2 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/util/math.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/util/math.hpp @@ -450,7 +450,7 @@ struct define_half_pi template <typename T> struct relaxed_epsilon { - static inline T apply(const T& factor) + static inline T apply(T const& factor) { return factor * std::numeric_limits<T>::epsilon(); } diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/util/series_expansion.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/util/series_expansion.hpp index bdc4d7c6eb..55c8b8f2fc 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/util/series_expansion.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/util/series_expansion.hpp @@ -30,6 +30,7 @@ #ifndef BOOST_GEOMETRY_UTIL_SERIES_EXPANSION_HPP #define BOOST_GEOMETRY_UTIL_SERIES_EXPANSION_HPP +#include <boost/array.hpp> #include <boost/geometry/core/assert.hpp> #include <boost/geometry/util/math.hpp> diff --git a/contrib/restricted/boost/geometry/include/boost/geometry/views/detail/boundary_view/implementation.hpp b/contrib/restricted/boost/geometry/include/boost/geometry/views/detail/boundary_view/implementation.hpp index 8a17b760ce..df9842d1f8 100644 --- a/contrib/restricted/boost/geometry/include/boost/geometry/views/detail/boundary_view/implementation.hpp +++ b/contrib/restricted/boost/geometry/include/boost/geometry/views/detail/boundary_view/implementation.hpp @@ -23,6 +23,7 @@ #include <boost/core/addressof.hpp> #include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_categories.hpp> +#include <boost/range/size.hpp> #include <boost/geometry/algorithms/num_interior_rings.hpp> #include <boost/geometry/core/assert.hpp> diff --git a/contrib/restricted/boost/geometry/ya.make b/contrib/restricted/boost/geometry/ya.make index eb724ded04..bc4a609832 100644 --- a/contrib/restricted/boost/geometry/ya.make +++ b/contrib/restricted/boost/geometry/ya.make @@ -10,9 +10,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.83.0) +VERSION(1.84.0) -ORIGINAL_SOURCE(https://github.com/boostorg/geometry/archive/boost-1.83.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/geometry/archive/boost-1.84.0.tar.gz) PEERDIR( contrib/restricted/boost/algorithm |