From d248e61e0431b33fcea2a503b451c34840c04a14 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 7 Jan 2019 08:03:57 +0100 Subject: [PATCH 01/83] Add copy constructor in order to avoid warning --- Stream_support/include/CGAL/IO/Color.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Stream_support/include/CGAL/IO/Color.h b/Stream_support/include/CGAL/IO/Color.h index a6797a71cf7..4d5da9c9863 100644 --- a/Stream_support/include/CGAL/IO/Color.h +++ b/Stream_support/include/CGAL/IO/Color.h @@ -40,6 +40,10 @@ public: : _red(red), _green(green), _blue(blue), _alpha(alpha) {} + Color(const Color& other) + : _red(other._red), _green(other._green), _blue(other._blue), _alpha(other._alpha) + {} + unsigned char r() const {return _red;} unsigned char g() const {return _green;} unsigned char b() const {return _blue;} From 61834560903fe055313107382b4591bd763a3565 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 7 Jan 2019 09:48:55 +0100 Subject: [PATCH 02/83] Remove assignemnt instead of adding copy constructor --- Stream_support/include/CGAL/IO/Color.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Stream_support/include/CGAL/IO/Color.h b/Stream_support/include/CGAL/IO/Color.h index 4d5da9c9863..a9cfdb57f25 100644 --- a/Stream_support/include/CGAL/IO/Color.h +++ b/Stream_support/include/CGAL/IO/Color.h @@ -40,10 +40,6 @@ public: : _red(red), _green(green), _blue(blue), _alpha(alpha) {} - Color(const Color& other) - : _red(other._red), _green(other._green), _blue(other._blue), _alpha(other._alpha) - {} - unsigned char r() const {return _red;} unsigned char g() const {return _green;} unsigned char b() const {return _blue;} @@ -65,15 +61,6 @@ public: return !( (*this) == c); } - Color& operator=(const Color &c) - { - _red = c.red(); - _green = c.green(); - _blue = c.blue(); - _alpha = c.alpha(); - return *this; - } - private: unsigned char _red; unsigned char _green; From 30953ef2c1ccf838e3e474b8bb40137401b751cc Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 7 Jan 2019 12:26:03 +0100 Subject: [PATCH 03/83] Deal with Vector_d as well --- Kernel_d/include/CGAL/Kernel_d/Vector_d.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h index fa17a105a66..49b6ecb2f92 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h @@ -71,7 +71,13 @@ class Vector_d : public pR::Vector_d_base Vector_d(const Self& v) : Base(v) {} Vector_d(const Base& v) : Base(v) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Self& + operator=(const Self& v)=default; +#endif + Direction_d direction() const { return Base::direction(); } FT operator* (const Self& w) const From bbec783e0849635ef05fee4af0a25f03d5bf2ed9 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Jan 2019 17:19:17 +0100 Subject: [PATCH 04/83] Remove code for mips CC 7.4 as it triggers a warning: implicitly-declared --- .../CGAL/Triangulation_ds_circulators_2.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/TDS_2/include/CGAL/Triangulation_ds_circulators_2.h b/TDS_2/include/CGAL/Triangulation_ds_circulators_2.h index afd003f27e1..1dcd56d45db 100644 --- a/TDS_2/include/CGAL/Triangulation_ds_circulators_2.h +++ b/TDS_2/include/CGAL/Triangulation_ds_circulators_2.h @@ -68,9 +68,6 @@ public: Triangulation_ds_face_circulator_2(Vertex_handle v, Face_handle f = Face_handle()); - // MK: added to satisfy the mips CC 7.40 compiler - Face_circulator& operator=(const Face_circulator& other); - Face_circulator& operator++(); Face_circulator operator++(int); Face_circulator& operator--(); @@ -273,19 +270,8 @@ Triangulation_ds_face_circulator_2(Vertex_handle v, Face_handle f) _v = Vertex_handle() ; pos = Face_handle(); return;} else CGAL_triangulation_precondition( pos->has_vertex(v)); } - -template < class Tds > -Triangulation_ds_face_circulator_2& -Triangulation_ds_face_circulator_2 :: -operator=(const Face_circulator& other) -{ - static_cast(*this) = - static_cast (other); - _v = other._v; - pos = other.pos; - return *this; -} - + + template < class Tds > Triangulation_ds_face_circulator_2& Triangulation_ds_face_circulator_2 :: From 3c1e450be2ad6b80564c7d6e157e9c060cbbf805 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Jan 2019 17:26:04 +0100 Subject: [PATCH 05/83] Do for Point_d the same as for Vector_d --- Kernel_d/include/CGAL/Kernel_d/Point_d.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Kernel_d/include/CGAL/Kernel_d/Point_d.h b/Kernel_d/include/CGAL/Kernel_d/Point_d.h index 721800dc4e8..85bcc3f2439 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Point_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Point_d.h @@ -80,7 +80,12 @@ public: Point_d(const Self &p) : Base(p) {} Point_d(const Base& p) : Base(p) {} - + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Self& + operator=(const Self& v)=default; +#endif + Vector_d operator-(const Origin& o) const { return Base::operator-(o); } Vector_d operator-(const Self& q) const From 685a546c8ca5ccd70a2b373f178072f5aecf72f5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Jan 2019 17:33:18 +0100 Subject: [PATCH 06/83] Fix Sqrt_extension --- .../include/CGAL/Sqrt_extension/Sqrt_extension_type.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h index da6b2c16058..1ac65d9834b 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -218,6 +218,10 @@ public: } } +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Self& + operator=(const Self& v)=default; +#endif Self conjugate() const { From 608c5c6ac8a847f15415c4889215a6119ae55143 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Jan 2019 17:43:45 +0100 Subject: [PATCH 07/83] Fix Seam_mesh and Dispatch_output_iterator --- BGL/include/CGAL/boost/graph/Seam_mesh.h | 5 +++++ STL_Extension/include/CGAL/iterator.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index 429e38c98ee..66ae765d146 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -63,6 +63,11 @@ public: : tmhd(tmhd), seam(seam) { } +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Seam_mesh_halfedge_descriptor& + operator=(const Seam_mesh_halfedge_descriptor&)=default; +#endif + bool operator==(const Seam_mesh_halfedge_descriptor& other) const { return (tmhd == other.tmhd) && (seam == other.seam); diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index c7207a10c8b..268b51b8061 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1371,12 +1371,17 @@ public: Dispatch_output_iterator(O... o) : cpp11::tuple(o...) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Dispatch_output_iterator(const Dispatch_output_iterator&)=default; +#endif + Self& operator=(const Self& s) { static_cast(*this) = static_cast(s); return *this; } - + template Self& operator=(const boost::variant& t) { internal::Output_visitor visitor(this); From f1dd633be0712cb4ced705de1e801d7548899629 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Jan 2019 17:54:47 +0100 Subject: [PATCH 08/83] Fix Kernel_23 and Cone_spanner --- Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h | 5 +++++ Polynomial/include/CGAL/Polynomial/Polynomial_type.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h index 3434d615dfa..4225c9233db 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_object.h @@ -39,6 +39,11 @@ public: Object_handle() : Base() {} Object_handle(const CGAL::Object& o) : Base(o) {} Object_handle(const Object_handle& h) : Base(h) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Object_handle& + operator=(const Object_handle& v)=default; +#endif }; Object_handle return_obj() diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index 8da24caf16b..62f9e46287c 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -361,7 +361,12 @@ public: : Base(Rep(c)) { reduce(); simplify_coefficients(); } #endif // defined(CGAL_USE_LEDA) || defined(DOXYGEN_RUNNING) - + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Polynomial& + operator=(const Polynomial& p)=default; +#endif + // // Public member functions // From cd6bf144fe46e94b4a133ce524bbcf20dbf1aa2b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 13:54:16 +0100 Subject: [PATCH 09/83] Simplify Seam_mesh --- BGL/include/CGAL/boost/graph/Seam_mesh.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index 66ae765d146..ff551d11c31 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -55,19 +55,10 @@ public: : tmhd(), seam(false) { } - Seam_mesh_halfedge_descriptor(const Seam_mesh_halfedge_descriptor& other) - : tmhd(other.tmhd), seam(other.seam) - { } - Seam_mesh_halfedge_descriptor(TM_halfedge_descriptor tmhd, bool seam = false) : tmhd(tmhd), seam(seam) { } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - Seam_mesh_halfedge_descriptor& - operator=(const Seam_mesh_halfedge_descriptor&)=default; -#endif - bool operator==(const Seam_mesh_halfedge_descriptor& other) const { return (tmhd == other.tmhd) && (seam == other.seam); From 1ec37a747848486b551c7b81c37caa75704809ea Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 13:54:38 +0100 Subject: [PATCH 10/83] Simplify Sqrt_extension --- .../CGAL/Sqrt_extension/Sqrt_extension_type.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h index 1ac65d9834b..92c33de4a50 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -153,13 +153,7 @@ public: explicit Sqrt_extension(const NTX& i) : a0_(NT(i)), a1_(NT(0)), root_(ROOT(0)), is_extended_(false) {} - /*! \brief copy constructor */ - Sqrt_extension(const Self& x) - : a0_(x.a0()), - a1_(x.a1()), - root_(x.root()), - is_extended_(x.is_extended()){} - + /*! \brief Expicite constructor of Sqrt_extension, from * \c Sqrt_extension. @@ -218,10 +212,6 @@ public: } } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - Self& - operator=(const Self& v)=default; -#endif Self conjugate() const { From 11131d3f6b0906fb4edd09fdaaa7767add179d56 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 14:08:09 +0100 Subject: [PATCH 11/83] Simplify Point_d and Vector_d --- Kernel_d/include/CGAL/Kernel_d/Point_d.h | 6 ------ Kernel_d/include/CGAL/Kernel_d/Vector_d.h | 9 +-------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Kernel_d/include/CGAL/Kernel_d/Point_d.h b/Kernel_d/include/CGAL/Kernel_d/Point_d.h index 85bcc3f2439..af9ecc7f6e2 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Point_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Point_d.h @@ -78,13 +78,7 @@ public: Point_d(int d, InputIterator first, InputIterator last, const RT& D) : Base (d, first, last, D) {} - Point_d(const Self &p) : Base(p) {} Point_d(const Base& p) : Base(p) {} - -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - Self& - operator=(const Self& v)=default; -#endif Vector_d operator-(const Origin& o) const { return Base::operator-(o); } diff --git a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h index 49b6ecb2f92..0a2ed2d8d1e 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h @@ -69,14 +69,7 @@ class Vector_d : public pR::Vector_d_base Vector_d (int d, InputIterator first, InputIterator last, const RT& D) : Base (d, first, last, D) {} - Vector_d(const Self& v) : Base(v) {} - Vector_d(const Base& v) : Base(v) {} - -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - Self& - operator=(const Self& v)=default; -#endif - + Vector_d(const Base& v) : Base(v) {} Direction_d direction() const { return Base::direction(); } From f4faff2137e51160755aa4c14d23c44e59545cdb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 17:14:12 +0100 Subject: [PATCH 12/83] Fix Apollonius_site --- Apollonius_graph_2/include/CGAL/Apollonius_site_2.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_site_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_site_2.h index 367a18a46e2..0aeba2cddfd 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_site_2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_site_2.h @@ -47,10 +47,6 @@ public: Apollonius_site_2(const Point_2& p = Point_2(), const Weight& w = Weight(0)) : _p(p), _w(w) {} - - Apollonius_site_2(const Apollonius_site_2& other) - : _p(other._p), _w(other._w) {} - const Point_2& point() const { return _p; } const Weight& weight() const { return _w; } From 3ad17887a69c86a162c225d943e3433debc30bf1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 17:18:11 +0100 Subject: [PATCH 13/83] Remove a g++ workaround with an #if 0 to really remove it if we can --- Circulator/include/CGAL/circulator.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index a58e5969df5..49b046f05b4 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -733,12 +733,14 @@ public: Circulator_from_container( Container* c) : ctnr(c), i(c->begin()) {} Circulator_from_container( Container* c, iterator j) : ctnr(c), i(j) {} +#if 0 // Gnu-bug workaround: define operator= explicitly. Self& operator=( const Self& c) { ctnr = c.ctnr; i = c.i; return *this; } +#endif // OPERATIONS From 630066dd24a9bcf7de70926fe7b0a4f520d7fb13 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 17:31:54 +0100 Subject: [PATCH 14/83] Fix Mesh_2 testsuite --- .../include/CGAL/Constrained_Delaunay_triangulation_2.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index f56addb6708..dd6f110c879 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -128,9 +128,6 @@ public: Constrained_Delaunay_triangulation_2(const Geom_traits& gt=Geom_traits()) : Ctr(gt) { } - Constrained_Delaunay_triangulation_2(const CDt& cdt) - : Ctr(cdt) {} - Constrained_Delaunay_triangulation_2(const List_constraints& lc, const Geom_traits& gt=Geom_traits()) : Ctr(gt) From 8dc8ca51e7aaf984d797f9f7148b1aeda221c044 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 17:38:04 +0100 Subject: [PATCH 15/83] Fix Nef_2 --- Nef_2/include/CGAL/Nef_2/Polynomial.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/Polynomial.h b/Nef_2/include/CGAL/Nef_2/Polynomial.h index 7e43da0e116..8694d983082 100644 --- a/Nef_2/include/CGAL/Nef_2/Polynomial.h +++ b/Nef_2/include/CGAL/Nef_2/Polynomial.h @@ -309,8 +309,6 @@ template class Polynomial : : Base(Polynomial_rep(NT(n1),NT(n2))) { reduce(); } // KILL int END - Polynomial(const Polynomial& p) : Base(p) {} - //protected: // accessing coefficients internally: NT& coeff(unsigned int i) { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size())); @@ -644,8 +642,6 @@ class Polynomial : : Base(Polynomial_rep(int(n1),int(n2))) { reduce(); } // KILL double END - Polynomial(const Polynomial& p) : Base(p) {} - //protected: // accessing coefficients internally: int& coeff(unsigned int i) { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size())); @@ -945,8 +941,6 @@ determines the sign for the limit process $x \rightarrow \infty$. : Base(Polynomial_rep(double(n1),double(n2))) { reduce(); } // KILL int END - Polynomial(const Polynomial& p) : Base(p) {} - //protected: // accessing coefficients internally: double& coeff(unsigned int i) { CGAL_assertion(!this->is_shared() && i<(this->ptr()->coeff.size())); From df17fbcdaad047c3989dd4c9b36c5dcaaae0a9c0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 17:48:30 +0100 Subject: [PATCH 16/83] Fix bilateral smoothing --- .../include/CGAL/bilateral_smooth_point_set.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index e8a2fe1b01f..da0d9c43a97 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -92,6 +92,10 @@ public: Kd_tree_element(const Kd_tree_element& other) : Base(other), index(other.index) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Kd_tree_element& operator=(const Kd_tree_element&)=default; +#endif }; From 6a2d92597766f880f38ba4af8b2b556f345101bc Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 17:58:48 +0100 Subject: [PATCH 17/83] Fix HDS --- HalfedgeDS/include/CGAL/HalfedgeDS_list.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/HalfedgeDS/include/CGAL/HalfedgeDS_list.h b/HalfedgeDS/include/CGAL/HalfedgeDS_list.h index a70dd2553cf..ef727f4bdc0 100644 --- a/HalfedgeDS/include/CGAL/HalfedgeDS_list.h +++ b/HalfedgeDS/include/CGAL/HalfedgeDS_list.h @@ -46,6 +46,11 @@ public: HalfedgeDS_in_place_list_vertex() {} HalfedgeDS_in_place_list_vertex( const VertexBase& v) // down cast : VertexBase(v) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + HalfedgeDS_in_place_list_vertex(const HalfedgeDS_in_place_list_vertex&)=default; +#endif + Self& operator=( const Self& v) { // This self written assignment avoids that assigning vertices will // overwrite the list linking of the target vertex. @@ -66,6 +71,11 @@ public: HalfedgeDS_in_place_list_halfedge() {} // down cast HalfedgeDS_in_place_list_halfedge( const HalfedgeBase& h) : HalfedgeBase(h) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + HalfedgeDS_in_place_list_halfedge(const HalfedgeDS_in_place_list_halfedge&)=default; +#endif + Self& operator=( const Self& h) { // This self written assignment avoids that assigning halfedges will // overwrite the list linking of the target halfedge. @@ -84,6 +94,11 @@ public: typedef typename FaceBase::Face_const_handle Face_const_handle; HalfedgeDS_in_place_list_face() {} // down cast HalfedgeDS_in_place_list_face( const FaceBase& f) : FaceBase(f) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + HalfedgeDS_in_place_list_face(const HalfedgeDS_in_place_list_face&)=default; +#endif + Self& operator=( const Self& f) { // This self written assignment avoids that assigning faces will // overwrite the list linking of the target face. From bb76e5193c988af9c28b786db6897ee27a0c4c85 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:05:29 +0100 Subject: [PATCH 18/83] Fix SVD --- .../include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h index 0560ebfc987..c01baf9e089 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h @@ -65,11 +65,6 @@ public: CGAL_exactness_precondition( !(CGAL::is_negative(B_)) ); } - Sqrt_extension_2(const Sqrt_extension_2& other) - : a0_(other.a0_), a1_(other.a1_), a2_(other.a2_), - a3_(other.a3_), A_(other.A_), B_(other.B_) {} - - NT a() const { return a0_; } NT b() const { return a1_; } NT c() const { return a2_; } From f945ce8e2cf41c7dcad3a0698662ad36c94e6cc3 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:08:55 +0100 Subject: [PATCH 19/83] Fix SVD_Linf --- Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h index 18ab9b952cf..c8e21eb01bb 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h @@ -52,10 +52,6 @@ class Polychainsegment_2 : public Polygon_2 { Polychainsegment_2() : Base() {} - Polychainsegment_2( - const Polychainsegment_2& pc) - : Base((Base) pc) {} - template Polychainsegment_2(InputIterator first, InputIterator last, Traits p_traits = Traits()) From 0aa4eef744a95e99f633535a444283945dcd2d6d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:10:14 +0100 Subject: [PATCH 20/83] Fix SVD_Linf --- Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h index c8e21eb01bb..b779fab08d1 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h @@ -369,11 +369,6 @@ public: is_line_optimization(false) {} - Polychainline_2(const Self& pcl) - : Base((Base) pcl), incoming(pcl.incoming), - is_line_optimization(pcl.is_line_optimization) - {} - template Polychainline_2(IncomingDirection dinc, InputIterator first, InputIterator last, From a48e367e459c70ab230a7d86087cfc8744509c94 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:16:54 +0100 Subject: [PATCH 21/83] Fix Kernel_d --- Kernel_d/include/CGAL/Kernel_d/DirectionCd.h | 1 - Kernel_d/include/CGAL/Kernel_d/DirectionHd.h | 1 - Kernel_d/include/CGAL/Kernel_d/HyperplaneCd.h | 1 - Kernel_d/include/CGAL/Kernel_d/HyperplaneHd.h | 1 - Kernel_d/include/CGAL/Kernel_d/PointCd.h | 1 - Kernel_d/include/CGAL/Kernel_d/PointHd.h | 1 - Kernel_d/include/CGAL/Kernel_d/VectorCd.h | 1 - Kernel_d/include/CGAL/Kernel_d/VectorHd.h | 1 - 8 files changed, 8 deletions(-) diff --git a/Kernel_d/include/CGAL/Kernel_d/DirectionCd.h b/Kernel_d/include/CGAL/Kernel_d/DirectionCd.h index c4c38e98cbc..224dd5bf9c0 100644 --- a/Kernel_d/include/CGAL/Kernel_d/DirectionCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/DirectionCd.h @@ -81,7 +81,6 @@ DirectionCd(const FT& x, const FT& y, const FT& z) : Base( Tuple(x,y,z) ) {} DirectionCd(int a, int b, int c) : Base( Tuple(FT(a),FT(b),FT(c), MatchHelper()) ) {} -DirectionCd(const DirectionCd& p) : Base(p) {} ~DirectionCd() {} int dimension() const { return ptr()->size(); } diff --git a/Kernel_d/include/CGAL/Kernel_d/DirectionHd.h b/Kernel_d/include/CGAL/Kernel_d/DirectionHd.h index 8ab3a7e17f9..31e329e36b5 100644 --- a/Kernel_d/include/CGAL/Kernel_d/DirectionHd.h +++ b/Kernel_d/include/CGAL/Kernel_d/DirectionHd.h @@ -134,7 +134,6 @@ $3$-dimensional space. }*/ DirectionHd(int a, int b, int c) : Base( Tuple(RT(a),RT(b),RT(c),RT(1)) ) {} -DirectionHd(const DirectionHd& p) : Base(p) {} ~DirectionHd() {} /*{\Moperations 5 3}*/ diff --git a/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd.h b/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd.h index e9a8d6a2ae1..7ef704a9abe 100644 --- a/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd.h @@ -144,7 +144,6 @@ HyperplaneCd(const FT& a, const FT& b, const FT& c, const FT& d) : HyperplaneCd(int a, int b, int c, int d) : Base( Tuple(FT(a),FT(b),FT(c),FT(d)) ) {} -HyperplaneCd(const HyperplaneCd& h) : Base(h) {} ~HyperplaneCd() {} int dimension() const { return ptr()->size()-1; } diff --git a/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd.h b/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd.h index 84aeda45408..227f2b60282 100644 --- a/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd.h +++ b/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd.h @@ -223,7 +223,6 @@ $3$-dimensional space with equation $ax+by+cz+d=0$. }*/ HyperplaneHd(int a, int b, int c, int d) : Base( Tuple(RT(a),RT(b),RT(c),RT(d)) ) {} -HyperplaneHd(const HyperplaneHd& h) : Base(h) {} ~HyperplaneHd() {} /*{\Moperations 4 2}*/ diff --git a/Kernel_d/include/CGAL/Kernel_d/PointCd.h b/Kernel_d/include/CGAL/Kernel_d/PointCd.h index c20764f79aa..e695fae4757 100644 --- a/Kernel_d/include/CGAL/Kernel_d/PointCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/PointCd.h @@ -105,7 +105,6 @@ PointCd(const FT& x, const FT& y, const FT& z, const FT& w) { CGAL_assertion_msg(w!=FT(0),"PointCd::construction: w == 0."); vector_rep()/=w; } -PointCd(const PointCd& p) : Base(p) {} ~PointCd() {} int dimension() const { return ptr()->size(); } diff --git a/Kernel_d/include/CGAL/Kernel_d/PointHd.h b/Kernel_d/include/CGAL/Kernel_d/PointHd.h index df0b46624ff..c7d09e8f98f 100644 --- a/Kernel_d/include/CGAL/Kernel_d/PointHd.h +++ b/Kernel_d/include/CGAL/Kernel_d/PointHd.h @@ -164,7 +164,6 @@ $3$-dimensional space.}*/ if (w < 0) invert_rep(); } -PointHd(const PointHd& p) : Base(p) {} ~PointHd() {} /*{\Moperations 4 3}*/ diff --git a/Kernel_d/include/CGAL/Kernel_d/VectorCd.h b/Kernel_d/include/CGAL/Kernel_d/VectorCd.h index 39de2146778..6faf43356ab 100644 --- a/Kernel_d/include/CGAL/Kernel_d/VectorCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/VectorCd.h @@ -113,7 +113,6 @@ VectorCd(int x, int y, int z, int w) : { CGAL_assertion_msg((w!=0), "VectorCd::construction: w == 0."); vector_rep()/=w; } -VectorCd(const VectorCd& p) : Base(p) {} ~VectorCd() {} int dimension() const { return ptr()->size(); } diff --git a/Kernel_d/include/CGAL/Kernel_d/VectorHd.h b/Kernel_d/include/CGAL/Kernel_d/VectorHd.h index a8a635fe750..4cf7557630a 100644 --- a/Kernel_d/include/CGAL/Kernel_d/VectorHd.h +++ b/Kernel_d/include/CGAL/Kernel_d/VectorHd.h @@ -177,7 +177,6 @@ VectorHd(int a, int b, int c, int d) : if (d < 0) invert_rep(); } -VectorHd(const VectorHd& p) : Base(p) {} ~VectorHd() {} /*{\Moperations 5 3 }*/ From 806ba2ec98fc68a678de1058368b245da787b2b6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:29:52 +0100 Subject: [PATCH 22/83] Add operartor= for DT3 --- TDS_3/include/CGAL/Triangulation_data_structure_3.h | 5 ++++- Triangulation_3/include/CGAL/Delaunay_triangulation_3.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index f248dd783f3..cace34cef40 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -827,7 +827,10 @@ public: output = f.output; filter = f.filter; return *this; - } + } +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Facet_it(const Facet_it&)=default; +#endif }; Facet_it facet_it() { return Facet_it(output, filter); diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 5d19859a5f9..d206487b36f 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -275,6 +275,10 @@ public: insert(first, last); } +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Delaunay_triangulation_3& operator=(const Delaunay_triangulation_3&)=default; +#endif + private: #ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE std::vector From 81d4227e5717c864a1196f57fa626d64181d414c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:40:10 +0100 Subject: [PATCH 23/83] Fix AABB tree --- AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h index c5d16dd78b4..b02bb264fb2 100644 --- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h +++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h @@ -65,6 +65,9 @@ namespace CGAL m_id = rhs.m_id; } +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Decorated_point& operator=(const Decorated_point&)=default; +#endif private: Id m_id; From de14c487dad3dc2349ccf2fdb443c3f5f4e23127 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:52:35 +0100 Subject: [PATCH 24/83] Fix Arrangement --- .../include/CGAL/Arr_geometry_traits/Circle_segment_2.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index fba31c556be..cf4f1e84e61 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -109,6 +109,10 @@ public: Point_handle (p) {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + _One_root_point_2& operator=(const _One_root_point_2&)=default; +#endif + /*! Constructor of a point with one-root coefficients. This constructor of a point can also be used with rational coefficients thanks to convertor of CoordNT. */ From cc9e304c60ae8b5d50d213b22198927adcca250f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Jan 2019 18:54:31 +0100 Subject: [PATCH 25/83] Fix Polygon --- Polygon/include/CGAL/Polygon_2.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index e3458435161..a7f6c25bc3f 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -164,7 +164,11 @@ class Polygon_2 { // Sun STL switches off member templates for binary backward compat. std::copy(first, last, std::back_inserter(d_container)); } - + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Polygon_2& operator=(const Polygon_2&)=default; +#endif + /// @} /// \name Modifiers From 380cffffb1942a7d48eefff3ab8297e3772b61ab Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 09:32:21 +0100 Subject: [PATCH 26/83] Remove copy constructor instead of adding operator= as it triggers a compilation error VC12 Poisson --- .../include/CGAL/Delaunay_triangulation_3.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index d206487b36f..f88764b8197 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -251,13 +251,6 @@ public: : Tr_Base(p0, p1, p2, p3, gt, lock_ds) {} - // copy constructor duplicates vertices and cells - Delaunay_triangulation_3(const Delaunay_triangulation_3& tr) - : Tr_Base(tr) - { - CGAL_triangulation_postcondition(is_valid()); - } - template < typename InputIterator > Delaunay_triangulation_3(InputIterator first, InputIterator last, const Gt& gt = Gt(), Lock_data_structure *lock_ds = NULL) @@ -275,9 +268,6 @@ public: insert(first, last); } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - Delaunay_triangulation_3& operator=(const Delaunay_triangulation_3&)=default; -#endif private: #ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE From 53816ffc2c2a29b29f15f539d08caa9fa85b5eab Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 17:59:03 +0100 Subject: [PATCH 27/83] Fix Seam_mesh --- BGL/include/CGAL/boost/graph/Seam_mesh.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index ff551d11c31..58d6c65e94c 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -299,10 +299,6 @@ public: : hd(h) { } - vertex_descriptor(const vertex_descriptor& other) - : hd(other.hd) - { } - bool operator==(const vertex_descriptor& other) const { return (hd == other.hd); From 805e0191fb6c3e0eba6ff6c0b7f5e855bcd05f26 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 18:01:25 +0100 Subject: [PATCH 28/83] Remove a gnu-bug workaround --- Circulator/include/CGAL/circulator.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index 49b046f05b4..a90474aef4c 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -733,15 +733,6 @@ public: Circulator_from_container( Container* c) : ctnr(c), i(c->begin()) {} Circulator_from_container( Container* c, iterator j) : ctnr(c), i(j) {} -#if 0 -// Gnu-bug workaround: define operator= explicitly. - Self& operator=( const Self& c) { - ctnr = c.ctnr; - i = c.i; - return *this; - } -#endif - // OPERATIONS bool operator==( Nullptr_t p) const { @@ -869,13 +860,6 @@ public: Const_circulator_from_container( const Mutable& c) : ctnr( c.container()), i( c.current_iterator()) {} -// Gnu-bug workaround: define operator= explicitly. - Self& operator=( const Self& c) { - ctnr = c.ctnr; - i = c.i; - return *this; - } - // OPERATIONS bool operator==( Nullptr_t p) const { From d8f608fa516b7be980c0f5c0d783b8974554841a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 18:20:36 +0100 Subject: [PATCH 29/83] fix Nef_3 --- Nef_3/include/CGAL/Nef_3/SNC_structure.h | 18 ++++++------------ Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_structure.h b/Nef_3/include/CGAL/Nef_3/SNC_structure.h index b84e87fb11d..50d82b7401f 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_structure.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_structure.h @@ -316,8 +316,7 @@ public: public: Halffacet_cycle_iterator() : Ibase() {} Halffacet_cycle_iterator(const Ibase& b) : Ibase(b) {} - Halffacet_cycle_iterator(const Halffacet_cycle_iterator& i) - : Ibase(i) {} + bool is_shalfedge() const { SHalfedge_handle e; return CGAL::assign(e,Ibase::operator*()); } bool is_shalfloop() const @@ -341,8 +340,7 @@ public: public: Halffacet_cycle_const_iterator() : Ibase() {} Halffacet_cycle_const_iterator(const Ibase& b) : Ibase(b) {} - Halffacet_cycle_const_iterator(const Halffacet_cycle_const_iterator& i) - : Ibase(i) {} + bool is_shalfedge() const { SHalfedge_handle e; return CGAL::assign(e,Ibase::operator*()); } bool is_shalfloop() const @@ -368,7 +366,7 @@ public: public: SFace_cycle_iterator() : Ibase() {} SFace_cycle_iterator(const Ibase& b) : Ibase(b) {} - SFace_cycle_iterator(const SFace_cycle_iterator& i) : Ibase(i) {} + bool is_svertex() const { SVertex_handle v; return CGAL::assign(v,Ibase::operator*()); } bool is_shalfedge() const @@ -395,8 +393,7 @@ public: public: SFace_cycle_const_iterator() : Ibase() {} SFace_cycle_const_iterator(const Ibase& b) : Ibase(b) {} - SFace_cycle_const_iterator(const SFace_cycle_const_iterator& i) - : Ibase(i) {} + bool is_svertex() const { SVertex_handle v; return CGAL::assign(v,Ibase::operator*()); } bool is_shalfedge() const @@ -427,8 +424,7 @@ public: public: Shell_entry_iterator() : Ibase() {} Shell_entry_iterator(const Ibase& b) : Ibase(b) {} - Shell_entry_iterator(const Shell_entry_iterator& i) : Ibase(i) {} - + operator SFace_handle() const { SFace_handle f; CGAL_assertion( CGAL::assign(f,Ibase::operator*()) ); @@ -445,9 +441,7 @@ public: public: Shell_entry_const_iterator() : Ibase() {} Shell_entry_const_iterator(const Ibase& b) : Ibase(b) {} - Shell_entry_const_iterator(const Shell_entry_const_iterator& i) : - Ibase(i) {} - + operator SFace_const_handle() const { SFace_handle f; CGAL_assertion( CGAL::assign(f,Ibase::operator*()) ); diff --git a/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h b/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h index 93db6222b67..14ecfb489a9 100644 --- a/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h +++ b/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h @@ -141,7 +141,7 @@ Sphere_segment(const Sphere_circle& c1, that is part of the halfsphere left of the oriented circle |c2|. \precond |c1 != c2| as unoriented circles.}*/ -Sphere_segment(const Self& s) : Base(s) {} +// Sphere_segment(const Self& s) : Base(s) {} /*{\Moperations 4 2}*/ From f627339eea7a3c5502d57ddea979870da68cbe35 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 18:32:48 +0100 Subject: [PATCH 30/83] Fix Vec and Exponent_vector --- GraphicsView/include/CGAL/Qt/vec.h | 3 ++- Polynomial/include/CGAL/Exponent_vector.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/vec.h b/GraphicsView/include/CGAL/Qt/vec.h index fcc9829dba3..68a17a8ac4b 100644 --- a/GraphicsView/include/CGAL/Qt/vec.h +++ b/GraphicsView/include/CGAL/Qt/vec.h @@ -115,13 +115,14 @@ and can hence be used in place of Vec. See also operator const qreal*() .*/ // Vec(const Vec& v) : x(v.x), y(v.y), z(v.z) {} /*! Equal operator. */ +#ifdef DOXYGEN_RUNNING Vec &operator=(const Vec &v) { x = v.x; y = v.y; z = v.z; return *this; } - +#endif /*! Set the current value. May be faster than using operator=() with a * temporary Vec(x,y,z). */ void setValue(qreal X, qreal Y, qreal Z) { diff --git a/Polynomial/include/CGAL/Exponent_vector.h b/Polynomial/include/CGAL/Exponent_vector.h index 3657a69f649..a5ef201f02d 100644 --- a/Polynomial/include/CGAL/Exponent_vector.h +++ b/Polynomial/include/CGAL/Exponent_vector.h @@ -62,7 +62,6 @@ public: }; Exponent_vector(const std::vector& v_): v(v_){}; - Exponent_vector(const Exponent_vector& ev): v(ev.v){}; template Exponent_vector(InputIterator begin , InputIterator end) From 1c21a80e61983e3b8b2df6a90c681a3b3945484a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 18:44:49 +0100 Subject: [PATCH 31/83] Fix SDG_Linf --- .../CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h index c6d3f292454..fab693cce20 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h @@ -110,9 +110,6 @@ public: Homogeneous_point_2(const Point_2& p) : hx_(p.x()), hy_(p.y()), hw_(1) {} - Homogeneous_point_2(const Homogeneous_point_2& other) - : hx_(other.hx_), hy_(other.hy_), hw_(other.hw_) {} - RT hx() const { return hx_; } RT hy() const { return hy_; } RT hw() const { return hw_; } From 303aaa04ae41244fb7a4e537af10dff79f8f0f50 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 19:18:53 +0100 Subject: [PATCH 32/83] Fix arrangement --- .../include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h | 4 +++- .../include/CGAL/Arr_rat_arc/Algebraic_point_2.h | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index 645b6cd5a56..71cec3a3ec1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -2881,12 +2881,14 @@ public: /*! Copy constructor * \param other the other arc */ +#ifdef DOXYGEN_RUNNING Arr_geodesic_arc_on_sphere_3 (const Arr_geodesic_arc_on_sphere_3& other) : Base(other) { m_is_x_monotone = other.m_is_x_monotone; } - +#endif + /*! Constructor * \param src the source point of the arc * \param trg the target point of the arc diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h index 77e7b6c5f0c..836fdf16ba0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h @@ -374,10 +374,6 @@ public: Algebraic_point_2() : Base(static_cast (get_default_instance())) {} - // explicit copy-constructor, required by VC9 - Algebraic_point_2 (const Self & p) - : Base(static_cast (p)) {} - Comparison_result compare_xy_2(const Algebraic_point_2& other, const Cache& cache) const { From bc455b471599b69f806afc9d935179d44aa89767 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 15 Jan 2019 19:25:45 +0100 Subject: [PATCH 33/83] Fix Largest_empty_iso_rectangle --- .../include/CGAL/Largest_empty_iso_rectangle_2.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h index d4604ac8435..a2aad1ea46d 100644 --- a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -254,16 +254,6 @@ public: Point_2 y_part;// the y coordinate of the point Point_2 original; - Internal_point & - operator=(const Internal_point &other) - { - x_part = other.x_part; - y_part = other.y_part; - original = other.original; - - return(*this); - } - Internal_point() // no real value - just to allow construction of LER : x_part(Point_2(0,0)), y_part(Point_2(0,0)), original(Point_2(0,0)) {} From 27cfecca608cfe3f1e56c22bdd0128575fd43563 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 16 Jan 2019 14:18:20 +0100 Subject: [PATCH 34/83] Use #ifndef DOXYGEN_RUNNING --- Polygon/include/CGAL/Polygon_2.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index a7f6c25bc3f..eda57abcbc9 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -166,7 +166,9 @@ class Polygon_2 { } #ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS +#ifndef DOXYGEN_RUNNING Polygon_2& operator=(const Polygon_2&)=default; +#endif #endif /// @} From d2eb07bbcdb7d3bac435dd3bd3aa08f04cc3ff93 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 17 Jan 2019 10:11:42 +0100 Subject: [PATCH 35/83] Fix warning This file specializes `std::swap` for a CGAL class. The `noexpect` part of the signature was missing (when C++11). ``` In file included from [..]/test/Polynomial/Exponent_vector.cpp:4: [...]/include/CGAL/Exponent_vector.h:172:6: warning: 'swap' is missing exception specification 'noexcept(is_nothrow_move_constructible::value && is_nothrow_move_assignable::value)' void swap(CGAL::Exponent_vector& ev1, CGAL::Exponent_vector& ev2){ ^ noexcept(is_nothrow_move_constructible::value && is_nothrow_move_assignable::value) [..]/include/CGAL/Exponent_vector.h:172:6: note: previous declaration is here 1 warning generated. ``` https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-Ic-99/Polynomial/TestReport_cgaltester_x86-64_Darwin-13.0_Apple-clang-5.0_Release-cpp11.gz --- Polynomial/include/CGAL/Exponent_vector.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Polynomial/include/CGAL/Exponent_vector.h b/Polynomial/include/CGAL/Exponent_vector.h index a5ef201f02d..cca04195a8d 100644 --- a/Polynomial/include/CGAL/Exponent_vector.h +++ b/Polynomial/include/CGAL/Exponent_vector.h @@ -169,7 +169,10 @@ inline std::ostream& operator << (std::ostream& os, const Exponent_vector& ev) { namespace std{ template <> inline -void swap(CGAL::Exponent_vector& ev1, CGAL::Exponent_vector& ev2){ +void swap(CGAL::Exponent_vector& ev1, CGAL::Exponent_vector& ev2) + CGAL_NOEXCEPT(std::is_nothrow_move_constructible::value + && std::is_nothrow_move_assignable::value) +{ ev1.swap(ev2); } From 6596ba981c43d7ccf27b383be927a959375309e6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 17 Jan 2019 19:34:22 +0100 Subject: [PATCH 36/83] Polygon, Surface_mesher, Nef,.. --- Nef_2/include/CGAL/Nef_2/HDS_items.h | 9 ++++----- Nef_S2/include/CGAL/Nef_S2/Sphere_map.h | 5 ++--- .../CGAL/Polygon_2/Polygon_2_vertex_circulator.h | 7 +------ .../mesh_to_point_set_hausdorff_distance.h | 16 +--------------- .../include/CGAL/Polychain_2.h | 4 +--- .../include/CGAL/Point_with_surface_index.h | 4 ---- 6 files changed, 9 insertions(+), 36 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/HDS_items.h b/Nef_2/include/CGAL/Nef_2/HDS_items.h index 1265cb2eb87..0d90bad3184 100644 --- a/Nef_2/include/CGAL/Nef_2/HDS_items.h +++ b/Nef_2/include/CGAL/Nef_2/HDS_items.h @@ -271,7 +271,7 @@ public: public: Hole_iterator() : Ibase() {} Hole_iterator(const Ibase& b) : Ibase(b) {} - Hole_iterator(const Hole_iterator& i) : Ibase(i) {} + operator Halfedge_handle() const { return Ibase::operator*(); } Halfedge& operator*() { return *(Ibase::operator*()); } Halfedge_handle operator->() { return Ibase::operator*(); } @@ -284,7 +284,7 @@ public: public: Hole_const_iterator() : Ibase() {} Hole_const_iterator(const Ibase& b) : Ibase(b) {} - Hole_const_iterator(const Hole_const_iterator& i) : Ibase(i) {} + operator Halfedge_const_handle() const { return Ibase::operator*(); } const Halfedge& operator*() { return *(Ibase::operator*()); } Halfedge_const_handle operator->() { return Ibase::operator*(); } @@ -299,7 +299,7 @@ public: public: Isolated_vertex_iterator() : Ibase() {} Isolated_vertex_iterator(const Ibase& b) : Ibase(b) {} - Isolated_vertex_iterator(const Isolated_vertex_iterator& i) + : Ibase(i) {} operator Vertex_handle() const { return Ibase::operator*(); } Vertex& operator*() { return *(Ibase::operator*()); } @@ -313,8 +313,7 @@ public: public: Isolated_vertex_const_iterator() : Ibase() {} Isolated_vertex_const_iterator(const Ibase& b) : Ibase(b) {} - Isolated_vertex_const_iterator( - const Isolated_vertex_const_iterator& i) : Ibase(i) {} + operator Vertex_const_handle() const { return Ibase::operator*(); } const Vertex& operator*() { return *(Ibase::operator*()); } Vertex_const_handle operator->() { return Ibase::operator*(); } diff --git a/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h b/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h index 0f0263f0677..9b1cd4c90fd 100644 --- a/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h +++ b/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h @@ -150,7 +150,7 @@ public: public: SFace_cycle_iterator() : Ibase() {} SFace_cycle_iterator(const Ibase& b) : Ibase(b) {} - SFace_cycle_iterator(const SFace_cycle_iterator& i) : Ibase(i) {} + bool is_svertex() const { SVertex_handle v; return CGAL::assign(v,Ibase::operator*()); } bool is_shalfedge() const @@ -177,8 +177,7 @@ public: public: SFace_cycle_const_iterator() : Ibase() {} SFace_cycle_const_iterator(const Ibase& b) : Ibase(b) {} - SFace_cycle_const_iterator(const SFace_cycle_const_iterator& i) - : Ibase(i) {} + bool is_svertex() const { SVertex_handle v; return CGAL::assign(v,Ibase::operator*()); } bool is_shalfedge() const diff --git a/Polygon/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h b/Polygon/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h index 4f32b4a86bb..b631984c6c7 100644 --- a/Polygon/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h +++ b/Polygon/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h @@ -64,12 +64,7 @@ public: Polygon_circulator( const Mutable& c) : ctnr( c.container()), i( c.current_iterator()) {} -// Gnu-bug workaround: define operator= explicitly. - Self& operator=( const Self& c) { - ctnr = c.ctnr; - i = c.i; - return *this; - } + // OPERATIONS diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h index 7ef39015f1e..080829ddffb 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h @@ -51,11 +51,7 @@ public: m_point = p; m_hausdorff = h; } - CPointH (const CPointH& p) - { - m_point = p (); - m_hausdorff = p.hausdorff (); - } + const Point& operator() () const { return m_point; } Point& operator() () { return m_point; } @@ -130,16 +126,6 @@ public: } } - CRefTriangle (const CRefTriangle& t) - { - m_point[0] = t.points ()[0]; - m_point[1] = t.points ()[1]; - m_point[2] = t.points ()[2]; - m_edge = t.edge (); - m_lower_bound = t.lower_bound (); - m_upper_bound = t.upper_bound (); - m_bisector = t.bisector (); - } FT lower_bound () const { diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h index b779fab08d1..44c078d7720 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h @@ -203,13 +203,11 @@ public: Polychainray_2(): Base(), outgoing() {} - Polychainray_2(const Polychainray_2& pcr) - : Base((Base) pcr), outgoing(pcr.outgoing) {} template Polychainray_2(InputIterator first, InputIterator last, OutgoingDirection d, - Traits p_traits = Traits()) + Traits p_traits = Traits()) : Base(first, last, p_traits), outgoing(d) { } diff --git a/Surface_mesher/include/CGAL/Point_with_surface_index.h b/Surface_mesher/include/CGAL/Point_with_surface_index.h index a551fc14021..57874e9f5b9 100644 --- a/Surface_mesher/include/CGAL/Point_with_surface_index.h +++ b/Surface_mesher/include/CGAL/Point_with_surface_index.h @@ -44,10 +44,6 @@ public: Point_with_surface_index(const Point& p) : Point(p), index(0) {} - - Point_with_surface_index(const Point_with_surface_index& pi) - : Point(pi), index(pi.surface_index()) {} - Point_with_surface_index(const FT& x, const FT& y, const FT& z, const FT& w = FT(1)) : Point(Point_traits().point(Bare_point(x, y, z, w))), index(0) {} From 91a1603eadec04fc77c48f58007e9c8105d9ab7f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 18 Jan 2019 09:44:58 +0100 Subject: [PATCH 37/83] fix Nef_2 --- Nef_2/include/CGAL/Nef_2/HDS_items.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Nef_2/include/CGAL/Nef_2/HDS_items.h b/Nef_2/include/CGAL/Nef_2/HDS_items.h index 0d90bad3184..575db95f5dd 100644 --- a/Nef_2/include/CGAL/Nef_2/HDS_items.h +++ b/Nef_2/include/CGAL/Nef_2/HDS_items.h @@ -300,7 +300,6 @@ public: Isolated_vertex_iterator() : Ibase() {} Isolated_vertex_iterator(const Ibase& b) : Ibase(b) {} - : Ibase(i) {} operator Vertex_handle() const { return Ibase::operator*(); } Vertex& operator*() { return *(Ibase::operator*()); } Vertex_handle operator->() { return Ibase::operator*(); } From 74dfe5f9ef748bc0a3023082afe1e4e45d17b561 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 18 Jan 2019 09:52:20 +0100 Subject: [PATCH 38/83] Fix Nef_S2 --- Nef_S2/include/CGAL/Nef_S2/SM_list.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_list.h b/Nef_S2/include/CGAL/Nef_S2/SM_list.h index 8e9d7137178..60a4bf2b6d0 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_list.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_list.h @@ -59,6 +59,9 @@ public: // typedef typename SVertex::SVertex_handle SVertex_handle; // typedef typename SVertex::SVertex_const_handle SVertex_const_handle; SNC_in_place_list_svertex() {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_in_place_list_svertex(const SNC_in_place_list_svertex& other)=default; +#endif SNC_in_place_list_svertex(const SVertex& v) // down cast : SVertex(v) {} Self& operator=( const Self& v) { @@ -78,6 +81,9 @@ public: // typedef typename SHalfedge::SHalfedge_handle SHalfedge_handle; // typedef typename SHalfedge::SHalfedge_const_handle SHalfedge_const_handle; SNC_in_place_list_shalfedge() {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_in_place_list_shalfedge(const SNC_in_place_list_shalfedge& other)=default; +#endif SNC_in_place_list_shalfedge(const SHalfedge& v) // down cast : SHalfedge(v) {} Self& operator=( const Self& v) { @@ -97,6 +103,9 @@ public: // typedef typename SFace::SFace_handle SFace_handle; // typedef typename SFace::SFace_const_handle SFace_const_handle; SNC_in_place_list_sface() {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_in_place_list_sface(const SNC_in_place_list_sface& other)=default; +#endif SNC_in_place_list_sface(const SFace& v) // down cast : SFace(v) {} Self& operator=( const Self& v) { From 0496d840ff2985a1ce4da0fc2f78fc8e49168524 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 18 Jan 2019 10:05:48 +0100 Subject: [PATCH 39/83] Fix arrangement and lcc --- .../include/CGAL/Arr_rat_arc/Rational_function.h | 4 ++++ .../include/CGAL/Linear_cell_complex_for_combinatorial_map.h | 4 +++- .../include/CGAL/Linear_cell_complex_for_generalized_map.h | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h index 21fd6aa7040..7f359ed9b3b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h @@ -232,6 +232,10 @@ public: Rational_function (const Self & r) : Base(static_cast (r)) {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Self& operator=(const Self&)=default; +#endif + CGAL::Sign sign_at(const Algebraic_real_1& x, CGAL::Sign epsilon = CGAL::ZERO) const { diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h index 40d8e20f58e..b47c841585c 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h @@ -109,9 +109,11 @@ namespace CGAL { * @param alcc the linear cell complex to copy. * @post *this is valid. */ +#ifdef DOXYGEN_RUNNING Linear_cell_complex_for_combinatorial_map(const Self& alcc) : Base(alcc) {} - +#endif + template < class LCC2 > Linear_cell_complex_for_combinatorial_map(const LCC2& alcc) : Base(alcc) {} diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_generalized_map.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_generalized_map.h index 16dfe3b048b..5a46ee191bc 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_generalized_map.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_generalized_map.h @@ -105,9 +105,11 @@ namespace CGAL { * @param alcc the linear cell complex to copy. * @post *this is valid. */ +#ifdef DOXYGEN_RUNNING Linear_cell_complex_for_generalized_map(const Self & alcc) : Base(alcc) {} - +#endif + template < class LCC2 > Linear_cell_complex_for_generalized_map(const LCC2& alcc) : Base(alcc) {} From 4bb714fd7bfc80fee1cfbb8de99a80459ca4ad45 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 18 Jan 2019 10:34:47 +0100 Subject: [PATCH 40/83] Fix OTR and T2 --- .../include/CGAL/OTR_2/Cost.h | 13 +------------ .../include/CGAL/Constrained_triangulation_2.h | 3 --- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h index 6feec2eb217..658bb8ed801 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h @@ -48,7 +48,7 @@ public: m_total_weight(0) {} - Cost(const FT norm, const FT tang) + Cost(const FT norm = FT(0), const FT tang = FT(0)) : m_norm(norm), m_tang(tang), m_max_norm(norm), @@ -56,17 +56,6 @@ public: m_total_weight(0) {} - ~Cost() {} - - Cost& operator= (const Cost& cost) - { - m_norm = cost.norm(); - m_tang = cost.tang(); - m_max_norm = cost.max_norm(); - m_max_tang = cost.max_tang(); - return *this; - } - const FT norm() const { return m_norm; } const FT tang() const { return m_tang; } diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index cd79f2c2914..a453d120cd1 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -171,9 +171,6 @@ public: Constrained_triangulation_2(const Gt& gt = Gt()) : Triangulation(gt) { } - Constrained_triangulation_2(const Constrained_triangulation_2& ct) - : Triangulation(ct) {} - Constrained_triangulation_2(std::list& lc, const Gt& gt=Gt()) : Triangulation_2(gt) { From 383d93d10a23c0a3e7188ebb7b42e63e43db9747 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 18 Jan 2019 15:29:34 +0100 Subject: [PATCH 41/83] Fix Kernel_d --- Convex_hull_d/include/CGAL/Delaunay_d.h | 1 - Kernel_d/include/CGAL/Kernel_d/Direction_d.h | 2 +- Kernel_d/include/CGAL/Kernel_d/Hyperplane_d.h | 1 - Kernel_d/include/CGAL/Kernel_d/Ray_d.h | 1 - Kernel_d/include/CGAL/Kernel_d/Segment_d.h | 2 +- Kernel_d/include/CGAL/Kernel_d/Sphere_d.h | 2 -- 6 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Convex_hull_d/include/CGAL/Delaunay_d.h b/Convex_hull_d/include/CGAL/Delaunay_d.h index ce9fc44ca46..7260e223796 100644 --- a/Convex_hull_d/include/CGAL/Delaunay_d.h +++ b/Convex_hull_d/include/CGAL/Delaunay_d.h @@ -228,7 +228,6 @@ public: } } - Simplex_iterator(const Simplex_iterator& it) : Base_iterator(it) {} Simplex_iterator& operator++() /* here we get a new candidate from the stack diff --git a/Kernel_d/include/CGAL/Kernel_d/Direction_d.h b/Kernel_d/include/CGAL/Kernel_d/Direction_d.h index ddbd184a07f..e26dbbc51b9 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Direction_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Direction_d.h @@ -58,7 +58,7 @@ class Direction_d : public pR::Direction_d_base Direction_d (int d, InputIterator first, InputIterator last) : Base(d, first, last) {} - Direction_d(const Direction_d &d) : Base(d) {} + Direction_d(const Vector_d &v) : Base(v) {} Direction_d(int d, Base_direction, int i) : Base(d,Base_direction(),i) {} diff --git a/Kernel_d/include/CGAL/Kernel_d/Hyperplane_d.h b/Kernel_d/include/CGAL/Kernel_d/Hyperplane_d.h index 771f8f422f2..b185267fd5d 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Hyperplane_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Hyperplane_d.h @@ -59,7 +59,6 @@ public: Hyperplane_d(const Point_d& p, const Direction_d& dir) : Base(p,dir) {} - Hyperplane_d(const Hyperplane_d &h) : Base(h) {} Hyperplane_d(const Base& p) : Base(p) {} template diff --git a/Kernel_d/include/CGAL/Kernel_d/Ray_d.h b/Kernel_d/include/CGAL/Kernel_d/Ray_d.h index ccf3c32c1fb..44ea58b2d7b 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Ray_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Ray_d.h @@ -114,7 +114,6 @@ starting at |s.source()|. \precond $s$ is not trivial. }*/ "Ray_d::constructor: segment is trivial."); } -Ray_d(const Ray_d& r) : Base(r) {} /*{\Moperations 3 3}*/ diff --git a/Kernel_d/include/CGAL/Kernel_d/Segment_d.h b/Kernel_d/include/CGAL/Kernel_d/Segment_d.h index 0d7584046ee..13743b7ca95 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Segment_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Segment_d.h @@ -95,7 +95,7 @@ Segment_d(const Point_d& p, const Vector_d& v) is initialized to the segment |(p,p+v)|. }*/ : Base( Pair(p,p+v) ) {} -Segment_d(const Segment_d& s) : Base(s) {} + /*{\Moperations 3 3}*/ diff --git a/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h b/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h index 216e23ad821..58a02edceeb 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h @@ -136,8 +136,6 @@ initialized to the sphere through the points in |A = set [first,last)|. \precond $A$ consists of $d+1$ $d$-dimensional points.}*/ Base( Rep(d,first,last) ) {} -Sphere_d(const Self& c) : Base(c) {} -~Sphere_d() {} /*{\Moperations 4 3}*/ From d03a49b5ae1ef0d40092e49ce3dd575dc219dc67 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 18 Jan 2019 16:05:52 +0100 Subject: [PATCH 42/83] Fix OTR --- .../include/CGAL/OTR_2/Cost.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h index 658bb8ed801..48efd912c35 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h @@ -40,13 +40,6 @@ private: FT m_total_weight; public: - Cost() - : m_norm(0), - m_tang(0), - m_max_norm(0), - m_max_tang(0), - m_total_weight(0) - {} Cost(const FT norm = FT(0), const FT tang = FT(0)) : m_norm(norm), From 561d68914285059842a7926b067bf0fbe11a324a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 18 Jan 2019 16:07:32 +0100 Subject: [PATCH 43/83] Fix Partition_2 --- Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h b/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h index ba7ec3982eb..ec18237b10d 100644 --- a/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h +++ b/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h @@ -329,6 +329,10 @@ class Partition_vertex : public Traits_::Point_2 current_diag = diag_endpoint_refs.end() ; } +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Partition_vertex& operator=(const Partition_vertex&)=default; +#endif + void insert_diagonal(Circulator v_ref) { diag_endpoint_refs.push_back(v_ref); From 156f4ffb8ef5a0d894a33ceb7b55df68a010b2db Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 21 Jan 2019 09:48:40 +0100 Subject: [PATCH 44/83] No need for Min_sphere_annulus_traits constructors --- Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_2.h | 3 --- Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_3.h | 4 ---- Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_d.h | 4 ---- 3 files changed, 11 deletions(-) diff --git a/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_2.h b/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_2.h index 7f2bcc46f56..b0cd0b0f7b6 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_2.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_2.h @@ -67,9 +67,6 @@ class Min_sphere_annulus_d_traits_2 { // typedef typename K::Construct_point_2 Construct_point_d; typedef _Construct_point_2 Construct_point_d; - // creation - Min_sphere_annulus_d_traits_2( ) { } - Min_sphere_annulus_d_traits_2( const Min_sphere_annulus_d_traits_2&) {} // operations Access_dimension_d diff --git a/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_3.h b/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_3.h index eed7c3e4b3f..bd6d70702c0 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_3.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_3.h @@ -67,10 +67,6 @@ class Min_sphere_annulus_d_traits_3 { // this does not (yet) work: // typedef typename K::Construct_point_3 Construct_point_d; - // creation - Min_sphere_annulus_d_traits_3( ) { } - Min_sphere_annulus_d_traits_3( const Min_sphere_annulus_d_traits_3&) {} - // operations Access_dimension_d access_dimension_d_object( ) const diff --git a/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_d.h b/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_d.h index 1b9195d7aa4..f4b294ad8ae 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_d.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_d.h @@ -65,10 +65,6 @@ class Min_sphere_annulus_d_traits_d { typedef CGAL::_Construct_point_d Construct_point_d; - // creation - Min_sphere_annulus_d_traits_d( ) { } - Min_sphere_annulus_d_traits_d( const Min_sphere_annulus_d_traits_d&) {} - // operations Access_dimension_d access_dimension_d_object( ) const From 0178843532fe61b7b21917e064073504027e0b19 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 21 Jan 2019 09:51:26 +0100 Subject: [PATCH 45/83] No need for Lin_d constructor --- Kernel_d/include/CGAL/Kernel_d/Line_d.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Kernel_d/include/CGAL/Kernel_d/Line_d.h b/Kernel_d/include/CGAL/Kernel_d/Line_d.h index 41d614c7f9b..009ed90fe26 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Line_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Line_d.h @@ -119,7 +119,6 @@ Line_d(const Ray_d& r) : Base(r) {} /*{\Mcreate introduces a variable |\Mvar| of type |\Mname| and initializes it to the line through |r.point(1)| and |r.point(2)|. }*/ -Line_d(const Line_d& l) : Base(l) {} /*{\Moperations 3 3}*/ From c4b82ba14b114c1b68ad5fe228fb78441380919d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 21 Jan 2019 14:41:46 +0100 Subject: [PATCH 46/83] Added swap() and an assignement operator for RT3 --- .../include/CGAL/Regular_triangulation_3.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_3.h index 5170956468e..7476a28d3e0 100644 --- a/Triangulation_3/include/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Regular_triangulation_3.h @@ -202,6 +202,24 @@ public: CGAL_triangulation_postcondition(is_valid()); } + void swap(Regular_triangulation_3& tr) + { + // The 'vertices' and 'hidden_points' members of 'hidden_point_visitor' should be empty + // as they are only filled (and cleared) during the insertion of a point. + // Hidden points are not stored there, but rather in cells. Thus, the only thing that must be set + // is the triangulation pointer. + Hidden_point_visitor new_hpv(this); + std::swap(hidden_point_visitor, new_hpv); + + Tr_Base::swap(tr); + } + + Regular_triangulation_3& operator=(Regular_triangulation_3 tr) + { + swap(tr); + return *this; + } + //insertion template < typename InputIterator > Regular_triangulation_3(InputIterator first, InputIterator last, From f10a4acfe414d10f2ea361998195170941df29bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 21 Jan 2019 14:43:27 +0100 Subject: [PATCH 47/83] Clarified RT3 test --- .../test/Triangulation_3/test_regular_3.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_regular_3.cpp b/Triangulation_3/test/Triangulation_3/test_regular_3.cpp index af6257bd002..3402aa96287 100644 --- a/Triangulation_3/test/Triangulation_3/test_regular_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_regular_3.cpp @@ -339,6 +339,7 @@ void test_RT() Point pp6(0.0, 1.0, 1.0); Point pp7(1.0, 0.0, 1.0); Point pp8(1.0, 1.0, 1.0); + Point pp9(0.5, 0.5, 0.5); Weighted_point wpp1(pp1, 1.0); Weighted_point wpp2(pp2, 2.0); @@ -348,6 +349,7 @@ void test_RT() Weighted_point wpp6(pp6, 1.0); Weighted_point wpp7(pp7, 1.0); Weighted_point wpp8(pp8, 8.0); + Weighted_point wpp9(pp9, -8.0); Cls T3; @@ -362,15 +364,15 @@ void test_RT() T3.insert(wpp5); T3.insert(wpp6); T3.insert(wpp7); - // Avoid inserting the same point twice, now that hidden points are handled, - // insert (existing_point) returns Vertex_handle(). - // T3.insert(wpp8); + Vertex_handle v8 = T3.insert(wpp8); Point query(0.5,0.5,0.5); assert(T3.nearest_power_vertex(query) == v8); - assert(T3.nearest_power_vertex_in_cell(query ,v8->cell()) == v8); - + + Vertex_handle v9 = T3.insert(wpp9); + assert(v9 == Vertex_handle()); // hidden point + // test dual std::cout << " test dual member functions" << std::endl; Finite_cells_iterator fcit = T3.finite_cells_begin(); From 9fc58ff874d034a966bfc9844cadfd66f5cc5e32 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 22 Jan 2019 17:12:02 +0100 Subject: [PATCH 48/83] Fix SNC_sphere_map --- Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h index 74219d9723f..648ec132394 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h @@ -153,7 +153,6 @@ class SNC_sphere_map : public Items_::template Vertexsncp(); } SNC_sphere_map(const Base& v) : Base(v), destruct(false) {} - SNC_sphere_map(const Self& M) : Base((Base) M), destruct(M.destruct) {} Self& operator=(const Self& M) { destruct = M.destruct; From 09ae18b1911ed9400d7502a742f7a9c2bf9f529a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 22 Jan 2019 19:05:00 +0100 Subject: [PATCH 49/83] Fix Nef_3 --- Nef_3/include/CGAL/Nef_3/SNC_list.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_list.h b/Nef_3/include/CGAL/Nef_3/SNC_list.h index 5f533749f36..1113b6b1c4e 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_list.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_list.h @@ -39,6 +39,9 @@ public: // typedef typename Vertex::Vertex_handle Vertex_handle; // typedef typename Vertex::Vertex_const_handle Vertex_const_handle; SNC_in_place_list_sm() {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_in_place_list_sm(const Self&)=default; +#endif SNC_in_place_list_sm(const Sphere_map& sm) // down cast : Sphere_map(sm) {} Self& operator=( const Self& sm) { @@ -60,6 +63,9 @@ public: SNC_in_place_list_halffacet() {} SNC_in_place_list_halffacet(const Halffacet& v) // down cast : Halffacet(v) {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_in_place_list_halffacet(const Self&)=default; +#endif Self& operator=( const Self& v) { // This self written assignment avoids that assigning vertices will // overwrite the list linking of the target vertex. @@ -79,6 +85,9 @@ public: SNC_in_place_list_volume() {} SNC_in_place_list_volume(const Volume& v) // down cast : Volume(v) {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_in_place_list_volume(const Self&)=default; +#endif Self& operator=( const Self& v) { // This self written assignment avoids that assigning vertices will // overwrite the list linking of the target vertex. @@ -98,6 +107,9 @@ public: SNC_in_place_list_shalfloop() {} SNC_in_place_list_shalfloop(const SHalfloop& v) // down cast : SHalfloop(v) {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_in_place_list_shalfloop(const Self&)=default; +#endif Self& operator=( const Self& v) { // This self written assignment avoids that assigning vertices will // overwrite the list linking of the target vertex. From ade49030000c257eeb06eb981b47af04cdb76ea8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 22 Jan 2019 19:05:36 +0100 Subject: [PATCH 50/83] Fix Voronoi --- Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h | 9 +++++++++ .../include/CGAL/refine_periodic_3_mesh_3.h | 9 +++++++++ STL_Extension/test/STL_Extension/test_Cache.cpp | 4 +++- .../include/CGAL/Voronoi_diagram_2/Dummy_iterator.h | 3 --- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h b/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h index 3a7cdb451ab..532fd9fca14 100644 --- a/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h +++ b/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h @@ -245,6 +245,11 @@ C3T3 make_periodic_3_mesh_3(const MD& md, const MC& mc, } #endif +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif + // see CGAL_PRAGMA_DIAG_PUSH // see @@ -277,6 +282,10 @@ BOOST_PARAMETER_FUNCTION( } CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + /** * @brief This function meshes the domain defined by mesh_traits * (respecting criteria), and outputs the mesh to c3t3 diff --git a/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h b/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h index c39ed5d3d6b..3c1d59597a2 100644 --- a/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h +++ b/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h @@ -144,6 +144,11 @@ void project_points(C3T3& c3t3, } // namespace internal +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif + // see CGAL_PRAGMA_DIAG_PUSH // see @@ -181,6 +186,10 @@ BOOST_PARAMETER_FUNCTION( CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + /** * @brief This function refines the mesh c3t3 wrt domain & criteria * diff --git a/STL_Extension/test/STL_Extension/test_Cache.cpp b/STL_Extension/test/STL_Extension/test_Cache.cpp index a7b3d6cf40e..1c8456a7764 100644 --- a/STL_Extension/test/STL_Extension/test_Cache.cpp +++ b/STL_Extension/test/STL_Extension/test_Cache.cpp @@ -41,7 +41,9 @@ struct Int_t : public CGAL::Handle_with_policy< Int_rep, Unify > { // This is needed to prevent VC7.1 and VC8 to call // the explicit templated constructor in Base instead of its copy-ctor. Int_t( Int_t const& rhs ) : Base( static_cast(rhs) ) {} - +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Int_t& operator=(Int_t const&)=default; +#endif int value() const { return this->ptr()->val; } void set_value( int i) { this->copy_on_write(); diff --git a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h index 4035622c3c4..b7a0ec6b23c 100644 --- a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h +++ b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h @@ -48,9 +48,6 @@ class Dummy_iterator : public Emptyset_iterator typedef std::ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; - Dummy_iterator() {} - Dummy_iterator(const Dummy_iterator&) {} - template< class T > Self& operator=(const T&) { return *this; } From c8183ab9411203bbb170e6677e24699d4f0d5d18 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 23 Jan 2019 10:23:47 +0100 Subject: [PATCH 51/83] Fix Quadratic_program_solution --- .../include/CGAL/Periodic_2_Delaunay_triangulation_2.h | 5 ++++- QP_solver/include/CGAL/QP_solution.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h index 8ba8b3d0c40..fba94a74ffe 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -152,7 +152,10 @@ public: { insert(first, last); } - + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Periodic_2_Delaunay_triangulation_2& operator=(const Periodic_2_Delaunay_triangulation_2&)=default; +#endif // \} /// \name Methods regarding the covering diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index eabdf9cfa74..0847acc03a6 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -314,6 +314,11 @@ public: : Handle_for*>(s), et0(0) {} + Quadratic_program_solution(const Quadratic_program_solution& rhs) + { + *this = rhs; + } + Quadratic_program_solution& operator= (const Quadratic_program_solution& sol) { From eaedab3c6045e84ce650b7fd994cf845c0397905 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 24 Jan 2019 17:46:26 +0100 Subject: [PATCH 52/83] Fix Algebraic_kernel_d --- .../include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h index 26d5fee93e3..ea78c01ec2f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h @@ -114,9 +114,6 @@ public: //! Default constructor Algebraic_real_d_1() : Base(static_cast(get_default_instance())) {} - //! copy constructor: copy existing Algebraic_real_d_1 (shares rep) - Algebraic_real_d_1(const Self& p) : Base(static_cast(p)) {} - //! creates the algebraic real from \a i. Algebraic_real_d_1(int i ) : Base(Algebraic_real_rep_d_1(i)) { } From a77988e14964ae0098d6f8c65704b74393eba176 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 24 Jan 2019 18:06:03 +0100 Subject: [PATCH 53/83] Fix Nef_3 --- Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h index 648ec132394..64726dd6037 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h @@ -154,6 +154,10 @@ class SNC_sphere_map : public Items_::template Vertex Date: Thu, 24 Jan 2019 18:17:46 +0100 Subject: [PATCH 54/83] Fix QP_solver --- QP_solver/include/CGAL/QP_solution.h | 1 + 1 file changed, 1 insertion(+) diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index 0847acc03a6..978a22a5674 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -315,6 +315,7 @@ public: {} Quadratic_program_solution(const Quadratic_program_solution& rhs) + : Handle_for*>(), et0(0) { *this = rhs; } From a7d65b7913d2b0a3cd5f311728b4a79e6a70d737 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 24 Jan 2019 18:22:02 +0100 Subject: [PATCH 55/83] Try to fix Polyhedron examples with Basic Viewer --- GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 18213239d26..86a90f336b8 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -27,6 +27,11 @@ #ifdef CGAL_USE_BASIC_VIEWER +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-copy" +#endif + #include #include @@ -37,6 +42,10 @@ #include #include +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + #include #include From fa2882cc0016a6c70286f0c96982bc259bd243c5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 24 Jan 2019 18:24:57 +0100 Subject: [PATCH 56/83] Fix STL_extensions --- STL_Extension/test/STL_Extension/test_In_place_list.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/STL_Extension/test/STL_Extension/test_In_place_list.cpp b/STL_Extension/test/STL_Extension/test_In_place_list.cpp index 76889732388..8ec200cdf04 100644 --- a/STL_Extension/test/STL_Extension/test_In_place_list.cpp +++ b/STL_Extension/test/STL_Extension/test_In_place_list.cpp @@ -184,6 +184,11 @@ struct item : public In_place_list_base { item( int i) : key(i) {} item( const item& i) : In_place_list_base(i), key(i.key) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + item& operator=(const item& rhs)=default; +#endif + bool operator== (const item& i) const { return key == i.key;} bool operator!= (const item& i) const { return key != i.key;} bool operator== (int i) const { return key == i;} From c548eee5c78c6038effb549e69c016006bdfbd92 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Jan 2019 08:28:17 +0100 Subject: [PATCH 57/83] Fix STL_Extension --- STL_Extension/include/CGAL/iterator.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 268b51b8061..ac11d10c315 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1444,6 +1444,10 @@ class Dispatch_or_drop_output_iterator < cpp11::tuple, cpp11::tuple public: Dispatch_or_drop_output_iterator(O... o) : Base(o...) {} + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Dispatch_or_drop_output_iterator(const Dispatch_or_drop_output_iterator&)=default; +#endif using Base::operator=; From 6b4ecd0f32b7496719a4157d7e70c073154ce9bd Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Jan 2019 08:32:48 +0100 Subject: [PATCH 58/83] Fix Snap_rounding --- Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index 3db1a9f4190..e69cdd387e0 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -591,7 +591,7 @@ public: iter->first->search(std::back_inserter(result), b); // create result - result_list.empty(); + CGAL_assertion(result_list.empty()); for( Point_with_hot_pixel_history_saved_iter my_point_iter = result.begin(); my_point_iter != result.end(); ++my_point_iter ) result_list.push_back(my_point_iter->object); From c636ea1ce28d9b8efb4207ac3816a34b297f064c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Jan 2019 08:37:26 +0100 Subject: [PATCH 59/83] Fix PSP --- .../include/CGAL/wlop_simplify_and_regularize_point_set.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index 27d4205cf8d..f01e5f0778e 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -78,9 +78,7 @@ public: Kd_tree_element(const Base& p, unsigned int id=0) : Base(p), index(id) {} - Kd_tree_element(const Kd_tree_element& other) - : Base(other), index(other.index) - {} + }; // Helper class for the Kd-tree From cc23699ea0391d7760d01397bf0e3c8693284b5a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Jan 2019 09:14:59 +0100 Subject: [PATCH 60/83] fix Arrangement_2 --- .../include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h | 2 ++ .../include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h | 4 +++- .../include/CGAL/Arr_rat_arc/Algebraic_point_2.h | 9 +++++++++ .../include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h | 3 ++- .../CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h | 4 +++- .../CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h | 3 ++- .../include/CGAL/Curved_kernel_via_analysis_2/Point_2.h | 3 ++- 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h index 9899bde527a..ff9d3be7b92 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h @@ -252,9 +252,11 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Status_line_CA_1(const Self& p) : Base(static_cast(p)) { } +#endif /*!\brief * constructs a status line over the \c i-th interval with x-coordinate diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h index e618f97359e..b24bbb4815e 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h @@ -174,10 +174,12 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Status_line_CPA_1(const Self& p) : Base(static_cast(p)) { } - +#endif + /*!\brief * constructs undefined status line */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h index 836fdf16ba0..6f532101d8c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h @@ -89,6 +89,15 @@ public: _rational_function(rational_function), _x_coordinate(x_coordinate) {} + Algebraic_point_2_rep(const Algebraic_point_2_rep& other) + { + if (this != &other) // protect against invalid self-assignment + { + _rational_function = other._rational_function; + _x_coordinate = other._x_coordinate; + } + } + //assignment oparator Algebraic_point_2_rep& operator=(const Algebraic_point_2_rep& other) { diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h index e92ca5ed945..52a0d51a6eb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h @@ -382,10 +382,11 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Arc_2(const Self& a) : Base(static_cast(a)) { } - +#endif //!@} public: diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h index 4f034795e13..036c132f4f3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h @@ -150,10 +150,12 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Generic_arc_2(const Self& p) : Base(static_cast(p)) { } - +#endif + /*!\brief * constructs an arc from a given represenation */ diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h index 26173e4aa7f..4279898ef41 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h @@ -131,10 +131,11 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Generic_point_2(const Self& p) : Base(static_cast(p)) { } - +#endif /*!\brief * constructs an arc from a given represenation */ diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h index 2260f6b92bc..d00859f803f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h @@ -256,10 +256,11 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Point_2(const Self& p) : Base(static_cast(p)) { } - +#endif //!@} public: From d069b6f673d64b8189f78dcdeaf546890f65305c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 30 Jan 2019 11:15:51 +0100 Subject: [PATCH 61/83] Only use -Wdeprecated-copy if GCC version is >=9 --- GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 86a90f336b8..2799c1c5790 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -27,10 +27,12 @@ #ifdef CGAL_USE_BASIC_VIEWER -#ifdef __GNUC__ +#ifdef __GNUC__ +#if __GNUC__ >= 9 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-copy" #endif +#endif #include #include @@ -42,9 +44,11 @@ #include #include -#ifdef __GNUC__ +#ifdef __GNUC__ +#if __GNUC__ >= 9 # pragma GCC diagnostic pop #endif +#endif #include #include From 8e4a74d3c4572faab40f0fed616caeb7cfab4234 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 31 Jan 2019 13:55:37 +0100 Subject: [PATCH 62/83] Fix Algebraic_kernel_d --- .../include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h index 624702379e1..954a6c6dd43 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h @@ -219,9 +219,11 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Xy_coordinate_2(const Self& p) : Base(static_cast(p)) { } +#endif /*!\brief * Point at \c x, on \c curve with \c arcno. Finite points on vertical arcs From 04eea7f7420cc58b44267c1ef4db75db99f099fe Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 31 Jan 2019 13:57:09 +0100 Subject: [PATCH 63/83] Fix Algebraic_kernel_d --- .../include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index 8c338f83e35..97b0c3f63d0 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -446,11 +446,12 @@ public: }; //! \brief Copy constructor +#ifdef DOXYGEN_RUNNING Curve_pair_analysis_2(const Self& alg_curve_pair) : Base(static_cast(alg_curve_pair)) { } - +#endif // Assignable /*! From 5c4e0a3392e3f33373a1986bee35d043274e1cac Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 31 Jan 2019 14:09:42 +0100 Subject: [PATCH 64/83] Fix Algebraic_kernel_d --- .../CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h | 6 +++++- .../CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index f632bfb3377..d6f0e659ce0 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -476,7 +476,9 @@ private: log_C_eps_ = n.log_C_eps_; } - // const Self& operator= (const Self&); // assignment is forbidden +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Self& operator= (const Self&) = delete; +#endif }; // struct Bitstream_descartes_E08_node @@ -575,9 +577,11 @@ public: Bitstream_descartes_E08_tree() : Base(Rep()) { } //! copy constructor +#ifdef DOXYGEN_RUNNING Bitstream_descartes_E08_tree(const Self& p) : Base(static_cast(p)) { } +#endif /*! \brief construct from initial interval and coefficients * diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index c9d84653e26..1928e0cdb39 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -566,8 +566,10 @@ private: log_eps_ = n.log_eps_; log_C_eps_ = n.log_C_eps_; } - - // const Self& operator= (const Self&); // assignment is forbidden + +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + Self& operator= (const Self&)=delete; +#endif }; // struct Bitstream_descartes_rndl_node From 4ce4b6a89be245f9649f897f561de827108ffbe4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 31 Jan 2019 14:12:22 +0100 Subject: [PATCH 65/83] Fix Algebraic_kernel_d --- .../include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index f77a1c6912b..73f96d078bc 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -505,11 +505,12 @@ public: } //! \brief Copy constructor +#ifdef DOXYGEN_RUNNING Curve_analysis_2(const Self& alg_curve) : Base(static_cast(alg_curve)) { } - +#endif //!@} From a3d18ca9337106a6c8d0b5610947dfe88086e48b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 31 Jan 2019 14:41:20 +0100 Subject: [PATCH 66/83] Fix AABB_tree demo --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index 11a5922ccf6..01f8665243e 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -16,6 +16,11 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() +if( (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND + (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9" OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "9") ) + set(CMAKE_CXX_FLAGS "-Wno-deprecated-copy ${CMAKE_CXX_FLAGS}") +endif() + # Include this package's headers first include_directories( BEFORE ./ ./include ) From ff4f13e82cae2704c86140b2866d99bf1acc7520 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 4 Feb 2019 09:08:48 +0100 Subject: [PATCH 67/83] Fix CMake tests for GCC version --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index 01f8665243e..67aa9ff64a1 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -16,8 +16,8 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() -if( (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND - (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9" OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "9") ) +if( (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND + (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "9" OR ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "9") ) set(CMAKE_CXX_FLAGS "-Wno-deprecated-copy ${CMAKE_CXX_FLAGS}") endif() From 2455affba0f5bbca3f87157978ddc9586c1c4695 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 6 Feb 2019 11:47:44 +0100 Subject: [PATCH 68/83] Move the addition of -Wno-deprecated-copy to CGAL_Qt5 setup That way: - that will work, even if CGAL CXX_FLAGS are copied (when hte CMake options `CGAL_DEV_MODE` or `RUNNING_CGAL_AUTO_TEST` are `ON`), - that will affect all CGAL Qt5 demos at once. --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 5 ----- .../cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index 67aa9ff64a1..11a5922ccf6 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -16,11 +16,6 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() -if( (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND - (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "9" OR ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "9") ) - set(CMAKE_CXX_FLAGS "-Wno-deprecated-copy ${CMAKE_CXX_FLAGS}") -endif() - # Include this package's headers first include_directories( BEFORE ./ ./include ) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index 2ab430f9200..37903ecbbb7 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -118,5 +118,13 @@ function(CGAL_setup_CGAL_Qt5_dependencies target) target_link_libraries( ${target} ${keyword} CGAL::Qt5_moc_and_resources) endif() target_link_libraries( ${target} ${keyword} Qt5::OpenGL Qt5::Svg Qt5::Xml) + + # Remove -Wdeprecated-copy, for g++ >= 9.0, because Qt5, as of + # version 5.12, has a lot of [-Wdeprecated-copy] warnings. + if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9" ) + target_compile_options( ${target} ${keyword} "-Wno-deprecated-copy" ) + endif() + endfunction() From 9d338e1a36170294fc89e8517dd656be66ec6db4 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 7 Feb 2019 11:27:08 +0100 Subject: [PATCH 69/83] Remove Z offset. --- .../demo/Polyhedron/resources/solid_wireframe_shader.g | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.g b/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.g index 69fa97d8062..0800640449b 100644 --- a/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.g +++ b/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.g @@ -24,8 +24,10 @@ out GS_OUT void main(void) { ; - //linearized arbitrary Z offset to keep the widelines in front of the edges as much as possible - float z_offset = (2.0 * near) / (far + near - 0.01f * (far - near)) - (2.0 * near) / (far + near); + //linearized arbitrary Z offset to keep the widelines in front of the edges as much as possible + //Problem if coef is not 0, edges might be visible through faces. + float coef = 0.0f; + float z_offset = (2.0 * near) / (far + near - coef * (far - near)) - (2.0 * near) / (far + near); vec3 ndc0 = gl_in[0].gl_Position.xyz / gl_in[0].gl_Position.w; vec3 ndc1 = gl_in[1].gl_Position.xyz / gl_in[1].gl_Position.w; From 873416e6da7acb8612acb3274cf0c830c532bf3a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 7 Feb 2019 16:10:42 +0100 Subject: [PATCH 70/83] Fix Algebraic_kernel_d --- .../CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 1928e0cdb39..5fc1321d51f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -933,9 +933,11 @@ public: Bitstream_descartes_rndl_tree() : Base(Rep()) { } //! copy constructor +#ifdef DOXYGEN_RUNNING Bitstream_descartes_rndl_tree(const Self& p) : Base(static_cast(p)) { } +#endif //! Internal function called by constructor. Avoids code duplication void init_tree() { From 8d558dc05fc660519bf1d9f72c3b3d88d9140cd7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 7 Feb 2019 17:45:31 +0100 Subject: [PATCH 71/83] Fix the warning about operator= --- STL_Extension/include/CGAL/iterator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index ac11d10c315..4b9331e88c0 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1447,6 +1447,7 @@ public: #ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Dispatch_or_drop_output_iterator(const Dispatch_or_drop_output_iterator&)=default; + Dispatch_or_drop_output_iterator& operator=(const Dispatch_or_drop_output_iterator&)=default; #endif using Base::operator=; From 9b71af64c8d595acb6d321e9b914a5b4d312a4aa Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 7 Feb 2019 17:49:14 +0100 Subject: [PATCH 72/83] Add -Wno-cast-function-type to fix a warning in Qt5 https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.14-Ic-117/Polyhedron_Demo/TestReport_lrineau_Ubuntu-latest-GCC6-CXX1z.gz ``` /usr/local/bin/c++ -DCGAL_EIGEN3_ENABLED -DCGAL_TEST_SUITE=1 -DCGAL_USE_GMP -DCGAL_USE_MPFR -DCGAL_USE_ZLIB=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_KEYWORDS -DQT_OPENGL_LIB -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DSCENE_IMAGE_GL_BUFFERS_AVAILABLE -DUSE_FORWARD_DECL -Dpolyhedron_demo_EXPORTS -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/polyhedron_demo_autogen/include -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/./CGAL_demo -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/./include -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/. -isystem /usr/include/x86_64-linux-gnu -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/include -I/mnt/testsuite/include -isystem /usr/include/eigen3 -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/usr/include/x86_64-linux-gnu/qt5/QtSvg -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtScript -DDONT_USE_BOOST_PROGRAM_OPTIONS -Wall -Wextra -std=c++1z -frounding-math -fPIC -Wno-deprecated-copy -Wall -frounding-math -fPIC -std=gnu++11 -o CMakeFiles/polyhedron_demo.dir/MainWindow.cpp.o -c /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/MainWindow.cpp In file included from /usr/include/x86_64-linux-gnu/qt5/QtScript/QScriptEngine:1, from /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/MainWindow.h:10, from /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/MainWindow.cpp:4: /usr/include/x86_64-linux-gnu/qt5/QtScript/qscriptengine.h: In instantiation of 'int qScriptRegisterMetaType(QScriptEngine*, QScriptValue (*)(QScriptEngine*, const T&), void (*)(const QScriptValue&, T&), const QScriptValue&, T*) [with T = CGAL::Three::Scene_item*]': /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-CXX1z/test/Polyhedron_Demo/MainWindow.cpp:313:67: required from here /usr/include/x86_64-linux-gnu/qt5/QtScript/qscriptengine.h:390:18: warning: cast between incompatible function types from 'QScriptValue (*)(QScriptEngine*, CGAL::Three::Scene_item* const&)' to 'QScriptEngine::MarshalFunction' {aka 'QScriptValue (*)(QScriptEngine*, const void*)'} [-Wcast-function-type] 390 | eng, id, reinterpret_cast(toScriptValue), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/x86_64-linux-gnu/qt5/QtScript/qscriptengine.h:391:9: warning: cast between incompatible function types from 'void (*)(const QScriptValue&, CGAL::Three::Scene_item*&)' to 'QScriptEngine::DemarshalFunction' {aka 'void (*)(const QScriptValue&, void*)'} [-Wcast-function-type] 391 | reinterpret_cast(fromScriptValue), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index 37903ecbbb7..804fff7b519 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -123,7 +123,7 @@ function(CGAL_setup_CGAL_Qt5_dependencies target) # version 5.12, has a lot of [-Wdeprecated-copy] warnings. if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9" ) - target_compile_options( ${target} ${keyword} "-Wno-deprecated-copy" ) + target_compile_options( ${target} ${keyword} "-Wno-deprecated-copy" "-Wno-cast-function-type" ) endif() endfunction() From 9d77454b271367412834ecdad935dc1720116a27 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 8 Feb 2019 08:17:00 +0100 Subject: [PATCH 73/83] Fix needed for VC2013 --- STL_Extension/include/CGAL/iterator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 4b9331e88c0..80e295843ec 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1445,7 +1445,7 @@ public: Dispatch_or_drop_output_iterator(O... o) : Base(o...) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS +#if( (! defined(CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS) ) && ( ( ! defined BOOST_MSVC) || (BOOST_MSVC > 1800) ) ) Dispatch_or_drop_output_iterator(const Dispatch_or_drop_output_iterator&)=default; Dispatch_or_drop_output_iterator& operator=(const Dispatch_or_drop_output_iterator&)=default; #endif From dcb6c1478c9754b622d73562282555bc1a176645 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 8 Feb 2019 08:57:43 +0100 Subject: [PATCH 74/83] Fix Arrangement_2 --- .../CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h index 299c91dad41..4933f72616b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h @@ -146,9 +146,11 @@ public: /*!\brief * copy constructor */ +#ifdef DOXYGEN_RUNNING Non_x_monotone_arc_2(const Self& a) : Base(static_cast(a)) { } +#endif /*! \brief * constructs an arc from one x-monotone piece From 99883c4b6a8afcc870671532ab74ed965b4ff745 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 8 Feb 2019 09:26:16 +0100 Subject: [PATCH 75/83] Fix a [-Wformat-overflow=] warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .../CGAL_ImageIO/include/CGAL/ImageIO_impl.h: In function ā€˜_image* _readImageHeaderAndGetError(const char*, int*)’: .../CGAL_ImageIO/include/CGAL/ImageIO_impl.h:1082:12: warning: ā€˜%s’ directive argument is null [-Wformat-overflow=] 1082 | fprintf(stderr, "_readImageHeaderAndGetError: error: unable to open file \'%s\'\n", name); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- CGAL_ImageIO/include/CGAL/ImageIO_impl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h index 6e8ec0ffb05..70581bbc45c 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h @@ -1079,7 +1079,11 @@ _image *_readImageHeaderAndGetError( const char *name_to_be_read, int *error ) _openReadImage(im, name); if(!im->fd) { - fprintf(stderr, "_readImageHeaderAndGetError: error: unable to open file \'%s\'\n", name); + if(name == NULL) { + fprintf(stderr, "_readImageHeaderAndGetError: error: NULL file name\n"); + } else { + fprintf(stderr, "_readImageHeaderAndGetError: error: unable to open file \'%s\'\n", name); + } _freeImage(im); *error = ImageIO_OPENING; if ( name != NULL ) free( name ); From 9f8d72b30ab01748f6485a0a2c3830504cf83b1f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 8 Feb 2019 09:40:09 +0100 Subject: [PATCH 76/83] Remove ';' --- .../include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h index aaddbbe254a..05346c0aac7 100644 --- a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h +++ b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h @@ -32,7 +32,7 @@ namespace CGAL { template class HalfedgeDS_default; -}; // namespace CGAL +} // namespace CGAL namespace boost { From b84f54a9e324104112c305a309a61015c36f4f66 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 8 Feb 2019 09:46:18 +0100 Subject: [PATCH 77/83] Do not define the macro CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS for VC2013 as suggested in Issue #3436 --- Installation/include/CGAL/config.h | 3 ++- STL_Extension/include/CGAL/iterator.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 0c1d7a3cbb9..5c37fb5fabf 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -210,7 +210,8 @@ #if defined(BOOST_NO_DELETED_FUNCTIONS) || \ defined(BOOST_NO_DEFAULTED_FUNCTIONS) || \ defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || \ - defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (BOOST_VERSION < 103600) + defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (BOOST_VERSION < 103600) || \ + (defined(_MSC_VER) && _MSC_VER < 1900) // MSVC 2013 has only partial support #define CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS 1 #endif #if defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) || \ diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 80e295843ec..4b9331e88c0 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1445,7 +1445,7 @@ public: Dispatch_or_drop_output_iterator(O... o) : Base(o...) {} -#if( (! defined(CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS) ) && ( ( ! defined BOOST_MSVC) || (BOOST_MSVC > 1800) ) ) +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Dispatch_or_drop_output_iterator(const Dispatch_or_drop_output_iterator&)=default; Dispatch_or_drop_output_iterator& operator=(const Dispatch_or_drop_output_iterator&)=default; #endif From 3ba6262fb5a304e289152070308c29aa1236824c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 8 Feb 2019 10:33:04 +0100 Subject: [PATCH 78/83] Fix a warning [-Wmaybe-uninitialized] in Algebraic_kernel_d ``` [ 50%] Building CXX object CMakeFiles/Algebraic_kernel_d_2.dir/Algebraic_kernel_d_2.cpp.o /usr/local/bin/c++ -DCGAL_TEST_SUITE=1 -DCGAL_USE_CORE=1 -DCGAL_USE_GMP -DCGAL_USE_GMPXX -DCGAL_USE_MPFI -DCGAL_USE_MPFR -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d/include -isystem /usr/include/x86_64-linux-gnu -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/include -I/mnt/testsuite/include -DDONT_USE_BOOST_PROGRAM_OPTIONS -Wall -Wextra -O3 -DCGAL_NDEBUG -frounding-math -Wall -frounding-math -o CMakeFiles/Algebraic_kernel_d_2.dir/Algebraic_kernel_d_2.cpp.o -c /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d/Algebraic_kernel_d_2.cpp In file included from /mnt/testsuite/include/CGAL/Polynomial.h:44, from /mnt/testsuite/include/CGAL/Algebraic_kernel_d_1.h:37, from /mnt/testsuite/include/CGAL/Algebraic_kernel_d_2.h:31, from /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d/Algebraic_kernel_d_2.cpp:25: /mnt/testsuite/include/CGAL/Handle_with_policy.h: In member function 'void CGAL::Curve_pair_analysis_2::compute_event_x_coordinates_with_event_indices() const [with AlgebraicKernelWithAnalysis_2 = CGAL::Algebraic_curve_kernel_2, CGAL::internal::Descartes, CORE::BigRat> > >]': /mnt/testsuite/include/CGAL/Handle_with_policy.h:1014:28: warning: '*((void*)& +8)' may be used uninitialized in this function [-Wmaybe-uninitialized] 1014 | Handle_policy::find( h); | ~~~~~~~~~~~~~~~~~~~^~~~ /mnt/testsuite/include/CGAL/Handle_with_policy.h:1014:28: warning: '*((void*)& +8)' may be used uninitialized in this function [-Wmaybe-uninitialized] 1014 | Handle_policy::find( h); | ~~~~~~~~~~~~~~~~~~~^~~~ /mnt/testsuite/include/CGAL/Handle_with_policy.h:1014:28: warning: '*((void*)& +8)' may be used uninitialized in this function [-Wmaybe-uninitialized] 1014 | Handle_policy::find( h); | ~~~~~~~~~~~~~~~~~~~^~~~ ``` The warning is because an uninitialized `optional` is copied (in a `push_back()`). The fix is to use `emplace_back()` to construct it directly in the vector, instead of copying it. --- .../Algebraic_kernel_d/Curve_pair_analysis_2.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index 97b0c3f63d0..28e270f0fac 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -1435,7 +1435,13 @@ compute_event_x_coordinates_with_event_indices() const { CGAL_ACK_DEBUG_PRINT << " one curve event" << std::endl; #endif */ +#if CGAL_CXX11 + // Fix a warning by using `emplace_back()` instead of + // copying a non-initialized `optional + this->ptr()->event_slices.emplace_back(); +#else this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1()); +#endif switch(*(one_curve_it++)) { case(CGAL::internal::ROOT_OF_FIRST_SET): { event_indices.push_back(Event_indices(-1,f_count,-1)); @@ -1462,8 +1468,11 @@ compute_event_x_coordinates_with_event_indices() const { CGAL_ACK_DEBUG_PRINT << " two curve event" << std::endl; #endif */ - this->ptr()-> - event_slices.push_back(Lazy_status_line_CPA_1()); +#if CGAL_CXX11 + this->ptr()->event_slices.emplace_back(); +#else + this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1()); +#endif event_indices.push_back (Event_indices(inter_count,-1,-1)); @@ -1477,7 +1486,11 @@ compute_event_x_coordinates_with_event_indices() const { << std::endl; #endif */ +#if CGAL_CXX11 + this->ptr()->event_slices.emplace_back(); +#else this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1()); +#endif switch(*(one_curve_it++)) { From 6853a9202d3e90f19299705616d4f32a1d3148dc Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 11 Feb 2019 10:10:37 +0100 Subject: [PATCH 79/83] Fix Algebraic_kernel --- .../Bitstream_coefficient_kernel_at_alpha.h | 4 +++- .../Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h index ec11b08d989..8ab8b90ad61 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h @@ -108,9 +108,11 @@ public: Bitstream_coefficient_kernel_at_alpha() : Base(Rep()) {} +#ifdef DOXYGEN_RUNNING Bitstream_coefficient_kernel_at_alpha(const Self& traits) : Base(static_cast(traits)) {} - +#endif + Bitstream_coefficient_kernel_at_alpha(Algebraic_kernel_d_1* kernel, Algebraic_real_1 alpha) : Base(kernel,alpha) {} diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h index 915e1ca83c5..f6f6de45b3c 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h @@ -154,9 +154,10 @@ public: : Base(static_cast(get_default_instance())){} // explicit copy-constructor, required by VC9 +#ifdef DOXYGEN_RUNNING Bitstream_descartes_rndl_tree_traits(const Self& traits) : Base(static_cast(traits)){} - +#endif //! @} class Approximator { From 896d5a7bd9aed6558d29338f58c4b3aab7eaecc3 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 11 Feb 2019 14:50:50 +0100 Subject: [PATCH 80/83] Quiet a warning [-Wmaybe-uninitialized] ``` [ 50%] Building CXX object CMakeFiles/test_exact_offset.dir/test_exact_offset.cpp.o /usr/local/bin/c++ -DCGAL_TEST_SUITE=1 -DCGAL_USE_CORE=1 -DCGAL_USE_GMP -DCGAL_USE_MPFR -isystem /usr/include/x86_64-linux-gnu -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Minkowski_sum_2 -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/include -I/mnt/testsuite/include -DDONT_USE_BOOST_PROGRAM_OPTIONS -Wall -Wextra -O3 -DCGAL_NDEBUG -frounding-math -Wall -frounding-math -o CMakeFiles/test_exact_offset.dir/test_exact_offset.cpp.o -c /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Minkowski_sum_2/test_exact_offset.cpp In file included from /mnt/testsuite/include/CGAL/Cartesian/Weighted_point_2.h:29, from /mnt/testsuite/include/CGAL/Cartesian/Cartesian_base.h:34, from /mnt/testsuite/include/CGAL/Cartesian.h:29, from /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Minkowski_sum_2/test_exact_offset.cpp:16: /mnt/testsuite/include/CGAL/Handle_for.h: In function 'OutputIterator CGAL::partition_approx_convex_2(InputIterator, InputIterator, OutputIterator, const Traits&) [with InputIterator = __gnu_cxx::__normal_iterator >*, std::vector >, std::allocator > > > >; Traits = CGAL::Partition_traits_2; OutputIterator = std::back_insert_iterator >, std::allocator > > > >, std::allocator >, std::allocator > > > > > > >]': /mnt/testsuite/include/CGAL/Handle_for.h:313:12: warning: '*((void*)& target +40)' may be used uninitialized in this function [-Wmaybe-uninitialized] 313 | return *(h.Ptr()); In file included from /mnt/testsuite/include/CGAL/partition_2.h:30, from /mnt/testsuite/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h:31, from /mnt/testsuite/include/CGAL/Polygon_convex_decomposition_2.h:27, from /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Minkowski_sum_2/test_exact_offset.cpp:22: /mnt/testsuite/include/CGAL/Partition_2/partition_approx_convex_2.h:173:23: note: '*((void*)& target +40)' was declared here 173 | Circulator source, target, before_s, after_s; | ^~~~~~ ``` It seems sufficient to declare the variables at a smaller scope. Strange... --- .../include/CGAL/Partition_2/partition_approx_convex_2.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Partition_2/include/CGAL/Partition_2/partition_approx_convex_2.h b/Partition_2/include/CGAL/Partition_2/partition_approx_convex_2.h index 6f1ebe295b1..d80406831e4 100644 --- a/Partition_2/include/CGAL/Partition_2/partition_approx_convex_2.h +++ b/Partition_2/include/CGAL/Partition_2/partition_approx_convex_2.h @@ -170,7 +170,6 @@ OutputIterator partition_approx_convex_2(InputIterator first, } while (++c != first_c); Segment_2 edge; - Circulator source, target, before_s, after_s; #ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG std::cout << "Inserting diagonals: " << std::endl; @@ -207,10 +206,10 @@ OutputIterator partition_approx_convex_2(InputIterator first, if (!triangles.is_infinite(*e_circ)) { edge = triangles.segment((*e_circ).first, (*e_circ).second); - source = edge.source(); - target = edge.target(); - before_s = source; before_s--; - after_s = source; after_s++; + Circulator source = edge.source(); + Circulator target = edge.target(); + Circulator before_s = source; before_s--; + Circulator after_s = source; after_s++; #ifdef CGAL_PARTITION_APPROX_CONVEX_DEBUG std::cout << "considering " << *source << " " << *target << "..."; From d8bef63907874ca7f6940fea16c37b161f41e446 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 11 Feb 2019 14:58:18 +0100 Subject: [PATCH 81/83] Do not initialize in the default constructor of circular_arc_3 --- Circular_kernel_3/include/CGAL/Circular_arc_3.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Circular_kernel_3/include/CGAL/Circular_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_arc_3.h index 3970d5a85f0..4b3f6b84bf6 100644 --- a/Circular_kernel_3/include/CGAL/Circular_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_arc_3.h @@ -65,7 +65,6 @@ namespace CGAL { } Circular_arc_3() - : RCircular_arc_3(typename R::Construct_circular_arc_3()()) {} Circular_arc_3(const Circle_3& c, From 14663ea7b47b75626569369c2ef71fccb413b144 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 11 Feb 2019 15:22:17 +0100 Subject: [PATCH 82/83] A circular_arc constructed from 3 points is not _full --- .../include/CGAL/Circular_kernel_3/Circular_arc_3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h index 7b315ad79f9..8bc678e82a4 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h @@ -221,6 +221,7 @@ namespace CGAL { Circular_arc_3(const Point_3 &begin, const Point_3 &middle, const Point_3 &end) + : _full(false) { CGAL_kernel_precondition(!typename SK::Collinear_3()(begin, middle, end)); const Circle_3 c = Circle_3(begin, middle, end); From 7fc2b8e80ed373719ab189613d931c2b3b8c9b88 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 12 Feb 2019 17:29:30 +0100 Subject: [PATCH 83/83] Initialize data member; remove mutable --- .../include/CGAL/Circular_kernel_3/Circular_arc_3.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h index 8bc678e82a4..4a723334b96 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h @@ -52,7 +52,7 @@ namespace CGAL { typedef typename SK::template Handle::type Base; Base base; - mutable bool _full; + bool _full; // It is the sign of the cross product // of the vector (Center -> S) x (Center -> T) // it saves execution time for the has_on functor @@ -141,7 +141,7 @@ namespace CGAL { // This is the one of the two cases we want that s == t // that makes the is_full() correct and complete Circular_arc_3(const Circle_3 &c) - : _full(true) + : _full(true), _sign_cross_product(CGAL::ZERO) { const Plane_3 &p = c.supporting_plane(); if(is_zero(p.b()) && is_zero(p.c())) { @@ -153,9 +153,6 @@ namespace CGAL { SphericalFunctors::x_extremal_point(c,true); base = Rep(c,v,v); } - /* don't matter - _sign_cross_product = 0; - */ } // This is the second case where we want that s == t