diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 07ad822d7f5..c94b77e4274 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -799,7 +799,7 @@ struct Approx_converter template < typename T > decltype(auto) operator()(const T&t) const - { return t.approx(); } + { return approx(t); } const Null_vector& operator()(const Null_vector& n) const @@ -824,7 +824,7 @@ struct Exact_converter template < typename T > decltype(auto) operator()(const T&t) const - { return t.exact(); } + { return exact(t); } const Null_vector& operator()(const Null_vector& n) const diff --git a/Filtered_kernel/include/CGAL/Static_filtered_predicate.h b/Filtered_kernel/include/CGAL/Static_filtered_predicate.h index cc6935f4dce..1b7b61bed0f 100644 --- a/Filtered_kernel/include/CGAL/Static_filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Static_filtered_predicate.h @@ -28,9 +28,7 @@ public: result_type operator()(const A1& a1) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1); } @@ -42,9 +40,7 @@ public: result_type operator()(const A1& a1, const Null_vector& v) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, v); } @@ -56,14 +52,11 @@ public: result_type operator()(const A1& a1, const A2& a2) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(approx(a1)); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, a2); } - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(approx(a2)); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(a1, a2); } @@ -76,9 +69,7 @@ public: result_type operator()(const Bbox_2& bb, const A2& a2) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(approx(a2)); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(bb, a2); } @@ -89,9 +80,7 @@ public: result_type operator()(const Bbox_3& bb, const A2& a2) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(approx(a2)); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(bb, a2); } @@ -102,19 +91,15 @@ public: result_type operator()(const A1& a1, const A2& a2, const A3& a3) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, a2, a3); } - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(a2.approx()); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(a1, a2, a3); } - typedef typename Type_mapper::type T3; - std::pair aa3 = convert(a3.approx()); + auto aa3 = convert(approx(a3)); if(! aa3.second){ return fp(a1, a2, a3); } @@ -126,30 +111,22 @@ public: result_type operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK1; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, a2, a3, a4); } - typedef typename Kernel_traits::type EK2; - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(a2.approx()); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(a1, a2, a3, a4); } - typedef typename Kernel_traits::type EK3; - typedef typename Type_mapper::type T3; - std::pair aa3 = convert(a3.approx()); + auto aa3 = convert(approx(a3)); if(! aa3.second){ return fp(a1, a2, a3, a4); } - typedef typename Kernel_traits::type EK4; - typedef typename Type_mapper::type T4; - std::pair aa4 = convert(a4.approx()); + auto aa4 = convert(approx(a4)); if(! aa4.second){ return fp(a1, a2, a3, a4); } @@ -160,29 +137,23 @@ public: result_type operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, a2, a3, a4, a5); } - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(a2.approx()); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(a1, a2, a3, a4, a5); } - typedef typename Type_mapper::type T3; - std::pair aa3 = convert(a3.approx()); + auto aa3 = convert(approx(a3)); if(! aa3.second){ return fp(a1, a2, a3, a4, a5); } - typedef typename Type_mapper::type T4; - std::pair aa4 = convert(a4.approx()); + auto aa4 = convert(approx(a4)); if(! aa4.second){ return fp(a1, a2, a3, a4, a5); } - typedef typename Type_mapper::type T5; - std::pair aa5 = convert(a5.approx()); + auto aa5 = convert(approx(a5)); if(! aa5.second){ return fp(a1, a2, a3, a4, a5); } @@ -193,34 +164,27 @@ public: result_type operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, a2, a3, a4, a5, a6); } - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(a2.approx()); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(a1, a2, a3, a4, a5, a6); } - typedef typename Type_mapper::type T3; - std::pair aa3 = convert(a3.approx()); + auto aa3 = convert(approx(a3)); if(! aa3.second){ return fp(a1, a2, a3, a4, a5, a6); } - typedef typename Type_mapper::type T4; - std::pair aa4 = convert(a4.approx()); + auto aa4 = convert(approx(a4)); if(! aa4.second){ return fp(a1, a2, a3, a4, a5, a6); } - typedef typename Type_mapper::type T5; - std::pair aa5 = convert(a5.approx()); + auto aa5 = convert(approx(a5)); if(! aa5.second){ return fp(a1, a2, a3, a4, a5, a6); } - typedef typename Type_mapper::type T6; - std::pair aa6 = convert(a6.approx()); + auto aa6 = convert(approx(a6)); if(! aa6.second){ return fp(a1, a2, a3, a4, a5, a6); } @@ -231,39 +195,31 @@ public: result_type operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A6& a7) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, a2, a3, a4, a5, a6, a7); } - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(a2.approx()); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(a1, a2, a3, a4, a5, a6, a7); } - typedef typename Type_mapper::type T3; - std::pair aa3 = convert(a3.approx()); + auto aa3 = convert(approx(a3)); if(! aa3.second){ return fp(a1, a2, a3, a4, a5, a6, a7); } - typedef typename Type_mapper::type T4; - std::pair aa4 = convert(a4.approx()); + auto aa4 = convert(approx(a4)); if(! aa4.second){ return fp(a1, a2, a3, a4, a5, a6, a7); } - typedef typename Type_mapper::type T5; - std::pair aa5 = convert(a5.approx()); + auto aa5 = convert(approx(a5)); if(! aa5.second){ return fp(a1, a2, a3, a4, a5, a6, a7); } - typedef typename Type_mapper::type T6; - std::pair aa6 = convert(a6.approx()); + auto aa6 = convert(approx(a6)); if(! aa6.second){ return fp(a1, a2, a3, a4, a5, a6, a7); } - typedef typename Type_mapper::type T7; - std::pair aa7 = convert(a7.approx()); + auto aa7 = convert(approx(a7)); if(! aa7.second){ return fp(a1, a2, a3, a4, a5, a6, a7); } @@ -275,44 +231,35 @@ public: result_type operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8) const { CGAL::Epic_converter convert; - typedef typename Kernel_traits::type EK; - typedef typename Type_mapper::type T1; - std::pair aa1 = convert(a1.approx()); + auto aa1 = convert(approx(a1)); if(! aa1.second){ return fp(a1, a2, a3, a4, a5, a6, a7, a8); } - typedef typename Type_mapper::type T2; - std::pair aa2 = convert(a2.approx()); + auto aa2 = convert(approx(a2)); if(! aa2.second){ return fp(a1, a2, a3, a4, a5, a6, a7, a8); } - typedef typename Type_mapper::type T3; - std::pair aa3 = convert(a3.approx()); + auto aa3 = convert(approx(a3)); if(! aa3.second){ return fp(a1, a2, a3, a4, a5, a6, a7, a8); } - typedef typename Type_mapper::type T4; - std::pair aa4 = convert(a4.approx()); + auto aa4 = convert(approx(a4)); if(! aa4.second){ return fp(a1, a2, a3, a4, a5, a6, a7, a8); } - typedef typename Type_mapper::type T5; - std::pair aa5 = convert(a5.approx()); + auto aa5 = convert(approx(a5)); if(! aa5.second){ return fp(a1, a2, a3, a4, a5, a6, a7, a8); } - typedef typename Type_mapper::type T6; - std::pair aa6 = convert(a6.approx()); + auto aa6 = convert(approx(a6)); if(! aa6.second){ return fp(a1, a2, a3, a5, a5, a6, a7, a8); } - typedef typename Type_mapper::type T7; - std::pair aa7 = convert(a7.approx()); + auto aa7 = convert(approx(a7)); if(! aa7.second){ return fp(a1, a2, a3, a5, a5, a6, a7, a8); } - typedef typename Type_mapper::type T8; - std::pair aa8 = convert(a8.approx()); + auto aa8 = convert(approx(a8)); if(! aa8.second){ return fp(a1, a2, a3, a4, a5, a6, a7, a8); } diff --git a/Kernel_23/include/CGAL/Origin.h b/Kernel_23/include/CGAL/Origin.h index 061401763e5..a84ed4d5a03 100644 --- a/Kernel_23/include/CGAL/Origin.h +++ b/Kernel_23/include/CGAL/Origin.h @@ -23,18 +23,7 @@ namespace CGAL { class Origin -{ -public: - const Origin& approx() const - { - return *this; - } - - const Origin& exact() const - { - return *this; - } -}; +{}; class Null_vector {};