From 000625107846ad1dbd54d342fd6fdb3594bc6f19 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Tue, 23 Jan 2024 16:29:28 +0100 Subject: [PATCH] commits on linux --- CMakeLists.txt | 2 + .../buffer/buffered_piece_collection.hpp | 2 +- .../detail/overlay/assign_parents.hpp | 7 ++- .../algorithms/detail/overlay/get_turns.hpp | 45 ++++++++++--------- .../detail/overlay/self_turn_points.hpp | 2 +- .../algorithms/detail/partition_lambda.hpp | 2 +- 6 files changed, 34 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 168c023f74..6d6c1739a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,3 +59,5 @@ if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") endif() +add_subdirectory(tickets) +add_subdirectory(research) diff --git a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp index 518d11834f..d538e6c670 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp @@ -486,7 +486,7 @@ struct buffered_piece_collection detail::sectionalize::enlarge_sections(monotonic_sections, m_strategy); - partition_lambda(monotonic_sections, + partition_lambda_one_range(monotonic_sections, [&strategy](auto& box, auto const& section) { geometry::expand(box, section.bounding_box, strategy); diff --git a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp index 297ee2b467..04cb270aa7 100644 --- a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp @@ -233,9 +233,12 @@ inline void assign_parents(Geometry1 const& geometry1, } } + // WORKAROUND for gcc 5-7, not able to recognize static const variables in lambdas. + bool const cfo = check_for_orientation; + // END WORKAROUND auto assign_to_map = [&](auto const& outer, auto const& inner) { - if (check_for_orientation + if (cfo || (math::larger(outer.real_area, 0) && math::smaller(inner.real_area, 0))) { auto& inner_in_map = ring_map[inner.id]; @@ -258,7 +261,7 @@ inline void assign_parents(Geometry1 const& geometry1, return true; }; - partition_lambda + partition_lambda_one_range < box_type >(vector, diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp index 6220af031e..e9ccad8927 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp @@ -494,29 +494,32 @@ class get_turns_generic std::decay_t, TurnPolicy >::apply(source_id1, geometry1, section1, - source_id2, geometry2, section2, - false, false, - strategy, - robust_policy, - turns, interrupt_policy); + source_id2, geometry2, section2, + false, false, + strategy, + robust_policy, + turns, interrupt_policy); }; - auto expand_box = [&strategy](auto& box, auto const& section) - { - geometry::expand(box, section.bounding_box, strategy); - }; - auto overlaps_box = [&strategy](auto const& box, auto const& section) - { - return ! detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy); - }; - - partition_lambda - < - box_type - >(sec1, sec2, - expand_box, overlaps_box, - expand_box, overlaps_box, - visit_sections); + partition_lambda( + sec1, sec2, + [&strategy](auto& box, auto const& sec) + { + geometry::expand(box, sec.bounding_box, strategy); + }, + [&strategy](auto const& box, auto const& section) + { + return !detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy); + }, + [&strategy](auto& b, auto const& s) + { + geometry::expand(b, s.bounding_box, strategy); + }, + [&strategy](auto const& box, auto const& section) + { + return !detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy); + }, + visit_sections); } }; diff --git a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp index f04bb1409c..7c091aafe4 100644 --- a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp @@ -125,7 +125,7 @@ struct get_turns return ! detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy); }; - partition_lambda + partition_lambda_one_range < box_type >(sections, expand_box, overlaps_box, visit_sections); diff --git a/include/boost/geometry/algorithms/detail/partition_lambda.hpp b/include/boost/geometry/algorithms/detail/partition_lambda.hpp index 7e6c688882..64a22f4a6a 100644 --- a/include/boost/geometry/algorithms/detail/partition_lambda.hpp +++ b/include/boost/geometry/algorithms/detail/partition_lambda.hpp @@ -100,7 +100,7 @@ template typename BoxType, typename ForwardRange > -bool partition_lambda(ForwardRange const& forward_range, +bool partition_lambda_one_range(ForwardRange const& forward_range, const std::function < void(BoxType&,