From e4469c043e23d60caf94371a6eb7f3bfb04b57ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 3 Nov 2025 15:46:19 +0100 Subject: [PATCH] handle backward compatibility --- .../Boolean_set_operations_2/do_intersect.h | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) 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 aa30de940dd..5b7b7f7b655 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 @@ -62,6 +62,15 @@ inline bool do_intersect(const Polygon_2& pgn1, return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const Polygon_2& pgn1, + const Polygon_2& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + // Polygon_2, Polygon_with_hole_2 ============================================== // With Traits template @@ -80,6 +89,15 @@ inline bool do_intersect(const Polygon_2& pgn1, return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const Polygon_2& pgn1, + const Polygon_with_holes_2& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + // Polygon_with_hole_2, Polygon_2 ============================================== // With Traits template @@ -98,6 +116,15 @@ inline bool do_intersect(const Polygon_with_holes_2& pgn1, return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const Polygon_with_holes_2& pgn1, + const Polygon_2& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + // Polygon_with_hole_2, Polygon_with_hole_2 ==================================== // With Traits template @@ -116,6 +143,15 @@ inline bool do_intersect(const Polygon_with_holes_2& pgn1, return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const Polygon_with_holes_2& pgn1, + const Polygon_with_holes_2& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + // General_polygon_2, General_polygon_2 ======================================== // With Traits template @@ -134,6 +170,15 @@ inline bool do_intersect(const General_polygon_2& pgn1, return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const General_polygon_2& pgn1, + const General_polygon_2& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + // General_polygon_2, General_polygon_with_holes_2 ============================= // With Traits template @@ -154,6 +199,16 @@ inline bool do_intersect(const General_polygon_2& pgn1, return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const General_polygon_2& pgn1, + const General_polygon_with_holes_2 + >& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + // General_polygon_with_holes_2, General_polygon_2 ============================= // With Traits template @@ -175,6 +230,17 @@ inline bool do_intersect(const General_polygon_with_holes_2 return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const General_polygon_with_holes_2 + >& pgn1, + const General_polygon_2& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + + // General_polygon_with_holes_2, General_polygon_with_holes_2 ================== // With Traits template @@ -193,6 +259,15 @@ inline bool do_intersect(const General_polygon_with_holes_2& pgn1, return s_do_intersect(pgn1, pgn2, traits); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(const General_polygon_with_holes_2& pgn1, + const General_polygon_with_holes_2& pgn2, + std::bool_constant) { + return do_intersect(pgn1, pgn2); +} +#endif + //@} /// \name Aggregated do_intersect() functions. @@ -224,6 +299,14 @@ inline bool do_intersect(InputIterator begin, InputIterator end, return do_intersect(begin, end, traits, k); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(InputIterator begin, InputIterator end, std::bool_constant, + std::enable_if_t::value>* = 0) { + return do_intersect(begin, end); +} +#endif + // With Traits template inline bool do_intersect(InputIterator1 begin1, InputIterator1 end1, @@ -249,6 +332,17 @@ inline bool do_intersect(InputIterator1 begin1, InputIterator1 end1, return r_do_intersect(begin1, end1, begin2, end2, traits, k); } +#ifndef CGAL_NO_DEPRECATED_CODE +template +inline bool do_intersect(InputIterator1 begin1, InputIterator1 end1, + InputIterator2 begin2, InputIterator2 end2, + std::bool_constant, + std::enable_if_t::value && + CGAL::is_iterator::value >* = 0) { + return do_intersect(begin1, end1, begin2, end2); +} +#endif + //@} } //namespace CGAL