Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] iterator_distance won't compile

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] iterator_distance won't compile


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] iterator_distance won't compile
  • Date: Thu, 25 Sep 2008 21:04:18 +0200

Roger House a écrit :
I have not been able to get this expression to compile with MSVC++

iterator_distance(P.edges_begin(), I)

where both operands are of type Polygon_2::Edge_const_iterator. The comment
in the code below shows the compiler error message. The attached file
contains the entire error message with all its gory details.

It seems that two iterators of the same type which point to the same object
should be acceptable to iterator_distance, but perhaps I fail to understand
something. Any help will be appreciated.

Having a quick look, it seems that some "const" are missing in
<CGAL/Polygon_2/Polygon_2_edge_iterator.h>, in the operator+ and operator-
(and other) member functions of the Polygon_2_edge_iterator class.
Could you try adding them and report back?

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page