From 8de892ff00f4f82cf284739f08a3047c076a9cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 12 May 2021 10:05:26 +0200 Subject: [PATCH] Rework Eigen detection in arc subsampling code --- .../internal/arc_on_sphere_2_subsampling.h | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h index 271421e5b02..10ca5b89fc7 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h +++ b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h @@ -16,6 +16,7 @@ #include #include +#include #ifdef CGAL_EIGEN3_ENABLED #include @@ -28,20 +29,35 @@ namespace CGAL { namespace Triangulations_on_sphere_2 { namespace internal { -template -double get_theta( typename Kernel::Point_3& pt, - typename Kernel::Vector_3& V1, - typename Kernel::Vector_3& V2, - typename Kernel::Vector_3& V3) +template +double get_theta(typename Kernel::Point_3& pt, + typename Kernel::Vector_3& V1, + typename Kernel::Vector_3& V2, + typename Kernel::Vector_3& V3) { typedef typename Kernel::FT FT; + typedef typename Default::Get Matrix; - typedef Eigen::Matrix Col; + Eigen::Matrix #else - CGAL_static_assertion_msg(false, "Eigen is required to perform arc subsampling!"); + EigenlessDefault #endif + >::type Matrix; + + typedef typename Default::Get +#else + EigenlessDefault +#endif + >::type Col; + + CGAL_static_assertion_msg(!(std::is_same::value), + "Eigen is required to perform arc subsampling!"); auto V1c = V1.cartesian_begin(), V2c = V2.cartesian_begin(), V3c = V3.cartesian_begin();