diff --git a/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp index 11c967f563c..b3f30e815f4 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits.cpp @@ -47,12 +47,12 @@ struct Get_max_coefficient{ } }; -template -struct Get_max_coefficient >{ +template +struct Get_max_coefficient >{ typedef Get_max_coefficient GMC; typedef typename GMC::result_type result_type; - result_type operator () (const CGAL::Sqrt_extension& a) { + result_type operator () (const CGAL::Sqrt_extension& a) { GMC gmc; return std::max(std::max(gmc(a.a0()), gmc(a.a1())), gmc(NT(a.root()))); } 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 01edf0a0c3e..2503d229e9b 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 @@ -153,9 +153,9 @@ struct Curve_renderer_traits_base struct Rat_to_float { typedef Float result_type; - template - Float operator()(const Sqrt_extension& x) const { - typename CGAL::Coercion_traits, Float>::Cast + template + Float operator()(const Sqrt_extension& x) const { + typename CGAL::Coercion_traits, Float>::Cast cast; return cast(x); } @@ -502,9 +502,9 @@ struct Curve_renderer_traits struct Rat_to_float { typedef Float result_type; - template - Float operator()(const Sqrt_extension& x) const { - typename CGAL::Coercion_traits, Float>::Cast + template + Float operator()(const Sqrt_extension& x) const { + typename CGAL::Coercion_traits, Float>::Cast cast; return cast(x); } diff --git a/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h b/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h index 01ebc0293f7..f77a951ad8f 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h @@ -43,11 +43,11 @@ class Algebraic_extension_traits - class Standardise > { + template + class Standardise > { Standardise standardise; public: - typedef CGAL::Sqrt_extension Type_; + typedef CGAL::Sqrt_extension Type_; typedef Type_ argument_type; typedef Type_ result_type; Type_ operator () (const Type_& a) const { 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 b95a0d11521..3e3338c086b 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -212,6 +212,12 @@ public: } } + + Self conjugate() const + { + if(!is_extended_) return *this; + return Self(a0_,-a1_,root_); + } //! Access operator for a0_, \c const inline const NT& a0() const { return a0_; } diff --git a/Number_types/test/Number_types/root_of_2.cpp b/Number_types/test/Number_types/root_of_2.cpp index 28b81e1c66c..1cfcd342fed 100644 --- a/Number_types/test/Number_types/root_of_2.cpp +++ b/Number_types/test/Number_types/root_of_2.cpp @@ -60,13 +60,13 @@ NT my_rand() //---------------------- -template -bool is_RO2_class(const CGAL::Sqrt_extension& ){ return true;} +template +bool is_RO2_class(const CGAL::Sqrt_extension& ){ return true;} template bool is_RO2_class(const T& ){ return false;} -template -CGAL::Sqrt_extension conjugate(const CGAL::Sqrt_extension& R){ +template +CGAL::Sqrt_extension conjugate(const CGAL::Sqrt_extension& R){ return R.conjugate(); }