From ef5bca8d105691bfa5661b51181e8517e662d609 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 7 Jun 2022 17:08:46 +0100 Subject: [PATCH 1/3] Regularized Boolean Set Operations: Help compiler to disambiguate --- .../CGAL/Boolean_set_operations_2/do_intersect.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h index 86a3caa571b..b3eba3b7e2d 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h @@ -237,7 +237,9 @@ inline bool do_intersect(const General_polygon_with_holes_2& pgn1, // With Traits template inline bool do_intersect(InputIterator begin, InputIterator end, Traits& traits, - unsigned int k=5) + unsigned int k=5, + typename boost::enable_if + >::type* = 0) { return r_do_intersect(begin, end, traits, k); } // Without Traits @@ -245,6 +247,8 @@ inline bool do_intersect(InputIterator begin, InputIterator end, Traits& traits, template inline bool do_intersect(InputIterator begin, InputIterator end, Tag_true = Tag_true(), unsigned int k=5, + typename boost::enable_if + >::type* = 0, Enable_if_Polygon_2_iterator* = 0) { return r_do_intersect(begin, end, k); } @@ -252,6 +256,8 @@ inline bool do_intersect(InputIterator begin, InputIterator end, template inline bool do_intersect(InputIterator begin, InputIterator end, Tag_false, unsigned int k=5, + typename boost::enable_if + >::type* = 0, Enable_if_Polygon_2_iterator* = 0) { typename Iterator_to_gps_traits::Traits traits; @@ -262,6 +268,8 @@ inline bool do_intersect(InputIterator begin, InputIterator end, template inline bool do_intersect(InputIterator begin, InputIterator end, unsigned int k=5, + typename boost::enable_if + >::type* = 0, Disable_if_Polygon_2_iterator* = 0) { typename Iterator_to_gps_traits::Traits traits; From 8c13bdaea39bd6291644c875439444239190bf76 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 7 Jun 2022 19:47:30 +0100 Subject: [PATCH 2/3] Add issue 6600 test case --- .../test/Intersections_2/issue6600.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Intersections_2/test/Intersections_2/issue6600.cpp diff --git a/Intersections_2/test/Intersections_2/issue6600.cpp b/Intersections_2/test/Intersections_2/issue6600.cpp new file mode 100644 index 00000000000..4c94455fd31 --- /dev/null +++ b/Intersections_2/test/Intersections_2/issue6600.cpp @@ -0,0 +1,15 @@ +#include +#include +#include +#include + +int main() +{ + typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; + typedef Kernel::Point_3 Point; + typedef CGAL::Surface_mesh Surface_mesh; + Surface_mesh mesh; + CGAL::Polygon_mesh_processing::experimental::autorefine_and_remove_self_intersections(mesh); + + return 0; +} From 7ba4fbcaabb7a6eaf85baf66a8f99a4152ceeb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 7 Jun 2022 20:57:57 +0200 Subject: [PATCH 3/3] std++14 style enable_if --- .../CGAL/Boolean_set_operations_2/do_intersect.h | 12 ++++-------- .../CGAL/Boolean_set_operations_2/intersection.h | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h index b3eba3b7e2d..820596d5fb7 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h @@ -238,8 +238,7 @@ inline bool do_intersect(const General_polygon_with_holes_2& pgn1, template inline bool do_intersect(InputIterator begin, InputIterator end, Traits& traits, unsigned int k=5, - typename boost::enable_if - >::type* = 0) + std::enable_if_t::value>* = 0) { return r_do_intersect(begin, end, traits, k); } // Without Traits @@ -247,8 +246,7 @@ inline bool do_intersect(InputIterator begin, InputIterator end, Traits& traits, template inline bool do_intersect(InputIterator begin, InputIterator end, Tag_true = Tag_true(), unsigned int k=5, - typename boost::enable_if - >::type* = 0, + std::enable_if_t::value>* = 0, Enable_if_Polygon_2_iterator* = 0) { return r_do_intersect(begin, end, k); } @@ -256,8 +254,7 @@ inline bool do_intersect(InputIterator begin, InputIterator end, template inline bool do_intersect(InputIterator begin, InputIterator end, Tag_false, unsigned int k=5, - typename boost::enable_if - >::type* = 0, + std::enable_if_t::value>* = 0, Enable_if_Polygon_2_iterator* = 0) { typename Iterator_to_gps_traits::Traits traits; @@ -268,8 +265,7 @@ inline bool do_intersect(InputIterator begin, InputIterator end, template inline bool do_intersect(InputIterator begin, InputIterator end, unsigned int k=5, - typename boost::enable_if - >::type* = 0, + std::enable_if_t::value>* = 0, Disable_if_Polygon_2_iterator* = 0) { typename Iterator_to_gps_traits::Traits traits; diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/intersection.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/intersection.h index 7599c835c5c..f961e507a0e 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/intersection.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/intersection.h @@ -288,8 +288,7 @@ inline OutputIterator intersection(InputIterator begin, InputIterator end, OutputIterator oi, unsigned int k=5, // workaround to avoid ambiguous calls with kernel functions - typename boost::enable_if - >::type* = 0, + std::enable_if_t::value>* = 0, Disable_if_Polygon_2_iterator* = 0) { typename Iterator_to_gps_traits::Traits traits;