diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index c9aec291440b..4f2071c4f736 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -3904,10 +3904,11 @@ class Arr_conic_traits_2 { auto u = cv.u(); auto v = cv.v(); auto w = cv.w(); - Algebraic* ys_end = m_nt_traits->solve_quadratic_equation(t*t - four*r*s, - two*t*u - four*r*v, - u*u - four*r*w, - ys); + Algebraic* ys_end = m_nt_traits->template + solve_quadratic_equation(t*t - four*r*s, + two*t*u - four*r*v, + u*u - four*r*w, + ys); auto n = static_cast(ys_end - ys); // Compute the x coordinates and construct the horizontal tangency points. @@ -3915,7 +3916,7 @@ class Arr_conic_traits_2 { // Having computed y, x is the single solution to the quadratic equation // above, and since its discriminant is 0, x is simply given by: Algebraic x = -(m_nt_traits->convert(t)*ys[i] + m_nt_traits->convert(u)) / - m_nt_traits->convert(two*r); + m_nt_traits->convert(Integer(two*r)); ps[i] = Point_2(x, ys[i]); } diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h index 63e31f8ad504..7520f9cfad29 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h @@ -336,7 +336,7 @@ struct Curve_renderer_traits, CORE::BigRat > : //! Specialization for \c CORE::BigFloat template <> -struct Curve_renderer_traits +struct Curve_renderer_traits : public Curve_renderer_traits_base { diff --git a/Envelope_3/include/CGAL/Env_sphere_traits_3.h b/Envelope_3/include/CGAL/Env_sphere_traits_3.h index 3d272f81b29f..9c1eed123ff5 100644 --- a/Envelope_3/include/CGAL/Env_sphere_traits_3.h +++ b/Envelope_3/include/CGAL/Env_sphere_traits_3.h @@ -265,7 +265,7 @@ class Env_sphere_traits_3 : public ConicTraits_2 { if (n_ys == 0) return o; // no intersection // the x coordinate of the solution points - Algebraic xs = m / (2*a_diff); + Algebraic xs = m / (Rational(2)*a_diff); if (n_ys == 1) { // intersection is a point @@ -340,7 +340,7 @@ class Env_sphere_traits_3 : public ConicTraits_2 { } if (n_xs == 1) { // intersection is a point - Point_2 inter_point(xs[0], (-2*a_diff*xs[0] + m)/(2*b_diff) ); + Point_2 inter_point(xs[0], (-Rational(2)*a_diff*xs[0] + m)/(Rational(2)*b_diff) ); *o++ = inter_point; return o; } @@ -350,8 +350,8 @@ class Env_sphere_traits_3 : public ConicTraits_2 { // so we construct a COLLINEAR conic (with equation as in (1)) // with 2 endpoints Algebraic ys[2]; - ys[0] = (-2*a_diff*xs[0] + m)/(2*b_diff); - ys[1] = (-2*a_diff*xs[1] + m)/(2*b_diff); + ys[0] = (-Rational(2)*a_diff*xs[0] + m)/(Rational(2)*b_diff); + ys[1] = (-Rational(2)*a_diff*xs[1] + m)/(Rational(2)*b_diff); Alg_point_2 end1(xs[0], ys[0]); Alg_point_2 end2(xs[1], ys[1]); @@ -977,10 +977,10 @@ class Env_sphere_traits_3 : public ConicTraits_2 { const Rational& u = cv.u(); const Rational& v = cv.v(); // const Rational& w = cv.w(); // unused - Algebraic m = -1 * (2*r*x0 + t*y0 + u); - Algebraic n = 2*s*y0 + t*x0 + v; + Algebraic m = -1 * (Rational(2)*r*x0 + t*y0 + u); + Algebraic n = Rational(2)*s*y0 + t*x0 + v; // line coefficients: A3, B3, C3 - Algebraic A3 = -1*m, B3 = n, C3 = m*x0 - n*y0; + Algebraic A3 = -m, B3 = n, C3 = m*x0 - n*y0; // the tangences of the spheres (in point (x0,y0,z0)): Algebraic z0 = compute_envelope_z_in_point(cv_point, s1); @@ -1077,8 +1077,8 @@ class Env_sphere_traits_3 : public ConicTraits_2 { Algebraic x_diff = x1 - a, y_diff = y1 - b; // the coefficients are: Algebraic A = 1; - Algebraic B = -2*c; - Algebraic C = x_diff*x_diff + y_diff*y_diff + c*c - sqr_r; + Algebraic B = -Rational(2)*c; + Algebraic C = x_diff*x_diff + y_diff*y_diff + Algebraic(c*c - sqr_r); Algebraic zs[2]; Algebraic* zs_end; diff --git a/Number_types/test/Number_types/ioformat.cpp b/Number_types/test/Number_types/ioformat.cpp index 54eaa26bf227..457f1be15b11 100644 --- a/Number_types/test/Number_types/ioformat.cpp +++ b/Number_types/test/Number_types/ioformat.cpp @@ -106,7 +106,6 @@ int main() // CORE #ifdef CGAL_USE_CORE - static_assert(CGAL::Output_rep::is_specialized == true); //bug in io for CORE. test_it("CORE::BigInt"); test_it("CORE::BigRat");