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; 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)) { } 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_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..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 @@ -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 @@ -931,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() { 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 { 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 //!@} 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..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 @@ -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 /*! @@ -1434,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)); @@ -1461,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)); @@ -1476,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++)) { 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/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 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; } 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_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. */ 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..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) { @@ -374,10 +383,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 { 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/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/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 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: diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index 429e38c98ee..58d6c65e94c 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -55,10 +55,6 @@ 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) { } @@ -303,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); 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 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 ); 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, 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..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 @@ -221,6 +218,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); diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index a58e5969df5..a90474aef4c 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -733,13 +733,6 @@ public: Circulator_from_container( Container* c) : ctnr(c), i(c->begin()) {} Circulator_from_container( Container* c, iterator j) : ctnr(c), i(j) {} -// 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 { @@ -867,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 { 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/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 18213239d26..2799c1c5790 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -27,6 +27,13 @@ #ifdef CGAL_USE_BASIC_VIEWER +#ifdef __GNUC__ +#if __GNUC__ >= 9 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-copy" +#endif +#endif + #include #include @@ -37,6 +44,12 @@ #include #include +#ifdef __GNUC__ +#if __GNUC__ >= 9 +# pragma GCC diagnostic pop +#endif +#endif + #include #include 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/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. 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 { 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)) {} diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index 2ab430f9200..804fff7b519 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" "-Wno-cast-function-type" ) + endif() + endfunction() 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/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/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/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/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/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/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}*/ 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/Point_d.h b/Kernel_d/include/CGAL/Kernel_d/Point_d.h index 721800dc4e8..af9ecc7f6e2 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Point_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Point_d.h @@ -78,9 +78,8 @@ 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) {} - + Vector_d operator-(const Origin& o) const { return Base::operator-(o); } Vector_d operator-(const Self& q) const 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}*/ 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 }*/ diff --git a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h index fa17a105a66..0a2ed2d8d1e 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h @@ -69,9 +69,8 @@ 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) {} - + Vector_d(const Base& v) : Base(v) {} + Direction_d direction() const { return Base::direction(); } FT operator* (const Self& w) 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) {} diff --git a/Nef_2/include/CGAL/Nef_2/HDS_items.h b/Nef_2/include/CGAL/Nef_2/HDS_items.h index 25b7da232d1..95622c4cfb5 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,8 +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*()); } Vertex_handle operator->() { return Ibase::operator*(); } @@ -313,8 +312,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_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())); 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. 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..64726dd6037 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h @@ -153,8 +153,11 @@ 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) {} +#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS + SNC_sphere_map(const SNC_sphere_map&)=default; +#endif + Self& operator=(const Self& M) { destruct = M.destruct; Base* b(this); @@ -216,7 +219,7 @@ class SNC_sphere_map : public Items_::template Vertex& 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}*/ 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..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. 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..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,15 +40,8 @@ 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, 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 +49,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/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); 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 809365b1fd0..9af431ec077 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 @@ -164,7 +164,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; @@ -201,10 +200,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 << "..."; 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/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 16e854200c5..3fa94b32036 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 @@ -147,7 +147,7 @@ void project_points(C3T3& c3t3, # pragma warning(push) # pragma warning(disable:4003) // not enough actual parameters for macro #endif - + // see CGAL_PRAGMA_DIAG_PUSH // see 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 }; 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 diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index e3458435161..eda57abcbc9 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -164,7 +164,13 @@ 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 +#ifndef DOXYGEN_RUNNING + Polygon_2& operator=(const Polygon_2&)=default; +#endif +#endif + /// @} /// \name Modifiers 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/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.geom b/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.geom index 69fa97d8062..0800640449b 100644 --- a/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.geom +++ b/Polyhedron/demo/Polyhedron/resources/solid_wireframe_shader.geom @@ -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; diff --git a/Polynomial/include/CGAL/Exponent_vector.h b/Polynomial/include/CGAL/Exponent_vector.h index 3657a69f649..cca04195a8d 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) @@ -170,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); } 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 // diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index eabdf9cfa74..978a22a5674 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -314,6 +314,12 @@ public: : Handle_for*>(s), et0(0) {} + Quadratic_program_solution(const Quadratic_program_solution& rhs) + : Handle_for*>(), et0(0) + { + *this = rhs; + } + Quadratic_program_solution& operator= (const Quadratic_program_solution& sol) { diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index c7207a10c8b..4b9331e88c0 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); @@ -1439,6 +1444,11 @@ 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; + Dispatch_or_drop_output_iterator& operator=(const Dispatch_or_drop_output_iterator&)=default; +#endif using Base::operator=; 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/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;} 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_; } 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_; } 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..44c078d7720 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()) @@ -207,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) { } @@ -373,11 +367,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, 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); diff --git a/Stream_support/include/CGAL/IO/Color.h b/Stream_support/include/CGAL/IO/Color.h index a6797a71cf7..a9cfdb57f25 100644 --- a/Stream_support/include/CGAL/IO/Color.h +++ b/Stream_support/include/CGAL/IO/Color.h @@ -61,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; 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) {} 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 :: diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index ff1fce1d78e..f9cb9a52713 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -831,7 +831,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_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) 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) { diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 5d19859a5f9..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,6 +268,7 @@ public: insert(first, last); } + private: #ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE std::vector diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_3.h index 22095049387..bb88f2fe3dc 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, diff --git a/Triangulation_3/test/Triangulation_3/test_regular_3.cpp b/Triangulation_3/test/Triangulation_3/test_regular_3.cpp index 60d0423b248..a12dd1aaa17 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(); 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; }