Skip to content

Commit cb26dda

Browse files
committed
Merge pull request CGAL#6650 from afabri/Boolean_set_operations-disambuguate_do_intersect-GF
Regularized Boolean Set Operations: Help compiler to disambiguate
2 parents 6c1117b + 7ba4fbc commit cb26dda

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,24 @@ inline bool do_intersect(const General_polygon_with_holes_2<Polygon_>& pgn1,
237237
// With Traits
238238
template <typename InputIterator, typename Traits>
239239
inline bool do_intersect(InputIterator begin, InputIterator end, Traits& traits,
240-
unsigned int k=5)
240+
unsigned int k=5,
241+
std::enable_if_t<CGAL::is_iterator<InputIterator>::value>* = 0)
241242
{ return r_do_intersect(begin, end, traits, k); }
242243

243244
// Without Traits
244245
// Tag_true => convert to polylines
245246
template <typename InputIterator>
246247
inline bool do_intersect(InputIterator begin, InputIterator end,
247248
Tag_true = Tag_true(), unsigned int k=5,
249+
std::enable_if_t<CGAL::is_iterator<InputIterator>::value>* = 0,
248250
Enable_if_Polygon_2_iterator<InputIterator>* = 0)
249251
{ return r_do_intersect(begin, end, k); }
250252

251253
// Tag_false => do not convert to polylines
252254
template <typename InputIterator>
253255
inline bool do_intersect(InputIterator begin, InputIterator end,
254256
Tag_false, unsigned int k=5,
257+
std::enable_if_t<CGAL::is_iterator<InputIterator>::value>* = 0,
255258
Enable_if_Polygon_2_iterator<InputIterator>* = 0)
256259
{
257260
typename Iterator_to_gps_traits<InputIterator>::Traits traits;
@@ -262,6 +265,7 @@ inline bool do_intersect(InputIterator begin, InputIterator end,
262265
template <typename InputIterator>
263266
inline bool do_intersect(InputIterator begin, InputIterator end,
264267
unsigned int k=5,
268+
std::enable_if_t<CGAL::is_iterator<InputIterator>::value>* = 0,
265269
Disable_if_Polygon_2_iterator<InputIterator>* = 0)
266270
{
267271
typename Iterator_to_gps_traits<InputIterator>::Traits traits;

Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/intersection.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ inline OutputIterator
288288
intersection(InputIterator begin, InputIterator end,
289289
OutputIterator oi, unsigned int k=5,
290290
// workaround to avoid ambiguous calls with kernel functions
291-
typename boost::enable_if
292-
<typename CGAL::is_iterator<InputIterator>>::type* = 0,
291+
std::enable_if_t<CGAL::is_iterator<InputIterator>::value>* = 0,
293292
Disable_if_Polygon_2_iterator<InputIterator>* = 0)
294293
{
295294
typename Iterator_to_gps_traits<InputIterator>::Traits traits;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
2+
#include <CGAL/Boolean_set_operations_2.h>
3+
#include <CGAL/Polygon_mesh_processing/corefinement.h>
4+
#include <CGAL/Surface_mesh.h>
5+
6+
int main()
7+
{
8+
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
9+
typedef Kernel::Point_3 Point;
10+
typedef CGAL::Surface_mesh<Point> Surface_mesh;
11+
Surface_mesh mesh;
12+
CGAL::Polygon_mesh_processing::experimental::autorefine_and_remove_self_intersections(mesh);
13+
14+
return 0;
15+
}

0 commit comments

Comments
 (0)