diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index c1fe154ca0d..b28d643f531 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -123,7 +123,7 @@ namespace CGAL { /// decrement. SM_Index operator--(int) { SM_Index tmp(*this); --idx_; return tmp; } - SM_Index operator+=(std::ptrdiff_t n) { idx_ += n; return *this; } + SM_Index operator+=(std::ptrdiff_t n) { idx_ = size_type(std::ptrdiff_t(idx_) + n); return *this; } private: size_type idx_;