diff --git a/NewKernel_d/include/CGAL/Epick_d.h b/NewKernel_d/include/CGAL/Epick_d.h index 0f96ce6fde1..cc16803352b 100644 --- a/NewKernel_d/include/CGAL/Epick_d.h +++ b/NewKernel_d/include/CGAL/Epick_d.h @@ -49,7 +49,7 @@ struct Epick_d_help1 }; #undef CGAL_BASE // determinant is only safe for use with integers with this condition, see LA_eigen/LA.h -#if _MSC_VER >= 1911 || __cpp_if_constexpr >= 201606L + #define CGAL_BASE \ Cartesian_filter_K< \ Epick_d_help1, \ @@ -67,10 +67,7 @@ struct Epick_d_help2 #undef CGAL_BASE #define CGAL_BASE \ Cartesian_static_filters,Epick_d_help3 > -#else -#define CGAL_BASE \ - Cartesian_static_filters,Epick_d_help3 > -#endif + template struct Epick_d_help3 : CGAL_BASE diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h index baff656bc69..a79c8f78c37 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h @@ -47,7 +47,7 @@ template<> struct Functors_without_division > { typedef typeset type; }; template<> struct Functors_without_division > { - typedef typeset type; + typedef typeset type; }; template < typename Base_, typename AK_, typename EK_, typename Pred_list = typeset_all > diff --git a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h index 9261ed89609..79a273d237f 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h @@ -115,6 +115,13 @@ template struct LA_eigen { return (int)v.cols(); } + template static NT determinant_aux(Mat_ const& m, Tag_true) { + CGAL_assume(false); + } + template static NT determinant_aux(Mat_ const& m, Tag_false) { + return m.determinant(); + } + template static NT determinant(Mat_ const&m,bool=false){ switch(m.rows()){ //case 0: @@ -161,14 +168,8 @@ template struct LA_eigen { m(5,0),m(5,1),m(5,2),m(5,3),m(5,4),m(5,5),m(5,6), m(6,0),m(6,1),m(6,2),m(6,3),m(6,4),m(6,5),m(6,6)); default: -#if _MSC_VER >= 1911 || __cpp_if_constexpr >= 201606L - // Avoid compiling the LU decomposition for nothing - if constexpr (Mat_::MaxRowsAtCompileTime >= 1 && Mat_::MaxRowsAtCompileTime <= 6) { - CGAL_assume(false); - } - else -#endif - return m.determinant(); + return determinant_aux(m, Boolean_tag<(Mat_::MaxRowsAtCompileTime >= 1 && Mat_::MaxRowsAtCompileTime <= 7)>()); + } }