Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Some patches for CGAL 4.0

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Some patches for CGAL 4.0


Chronological Thread 
  • From: Sascha Brawer <>
  • To: , Miroslaw Michalski <>
  • Cc: Daniel Berlin <>
  • Subject: Re: [cgal-discuss] Some patches for CGAL 4.0
  • Date: Tue, 17 Apr 2012 16:18:03 +0200

Hi Philipp,

> I've applied most of you patches, but have some questions about one of them.
Glad to hear that most of the patches turned out to be useful for CGAL!
 
> **************************************************************************
> The following patch is helpful when compiling CGAL with c++11:
>
> --- CGAL-4.0/include/CGAL/Constrained_triangulation_2.h 2012-01-17
> 21:01:00.000000000 +0100
> +++ changed-CGAL-4.0/include/CGAL/Constrained_triangulation_2.h 2012-04-16
> 11:35:58.859492000 +0200
> @@ -541,7 +541,7 @@
>
>    list_ab.push_back(Edge(lf, lf->index(current_face)));
>    list_ba.push_front(Edge(rf, rf->index(current_face)));
> -  intersected_faces.push_front(current_face);
> +  intersected_faces.push_front(current_face.handle());
>
>    // initcd
>    previous_face=current_face;
> @@ -574,7 +574,7 @@
>        }
>        else {
>   lf= current_face->neighbor(i2);
> - intersected_faces.push_front(current_face);
> + intersected_faces.push_front(current_face.handle());
>   if (orient == LEFT_TURN)
>    list_ab.push_back(Edge(lf, lf->index(current_face)));
>   else // orient == RIGHT_TURN
> @@ -590,7 +590,7 @@
>
>    // last triangle
>    vi = current_vertex;
> -  intersected_faces.push_front(current_face);
> +  intersected_faces.push_front(current_face.handle());
>    lf= current_face->neighbor(cw(ind));
>    list_ab.push_back(Edge(lf, lf->index(current_face)));
>    rf= current_face->neighbor(ccw(ind));

I don't see how this would be better or different for
C++11. Line_face_circulator has a non-explicit conversion operator to
Face_handle and Face_handle has no converting constructor from
Line_face_circulator, so the operator should be used. Both versions
should call vector::push_back(T&&), neither version would have speed
differences. This would of course change if the conversion operator
would be explicit, which might make sense.

Am I missing something here?

Hm, good point. Let me add Miroslaw () to this thread, who made the patch and might be able to clarify.

Best,

-- Sascha




Archive powered by MHonArc 2.6.16.

Top of Page