diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index 3d83cd97f2e..f8bc666b92f 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -425,7 +426,7 @@ class Polygon_2 { const Point_2& vertex(std::size_t i) const { CGAL_precondition( i < d_container.size() ); - return *(d_container.begin() + i); + return *(cpp11::next(d_container.begin(), i)); } @@ -435,7 +436,7 @@ class Polygon_2 { /// Returns the `i`-th edge. Segment_2 edge(std::size_t i) const - { return *(edges_begin() + i); } + { return *(cpp11::next(edges_begin(), i)); } /// @}