From b87fc09565bd8fcc160fc2b67d07f6473b4e3c4a Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 21 Jan 2020 17:41:30 +0100 Subject: [PATCH 1/3] Also test Triangulation with Epeck_d --- .../test/Triangulation/test_delaunay.cpp | 17 +++++++++++---- .../test/Triangulation/test_regular.cpp | 21 +++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/Triangulation/test/Triangulation/test_delaunay.cpp b/Triangulation/test/Triangulation/test_delaunay.cpp index bf6b38ff7ab..d98382e5530 100644 --- a/Triangulation/test/Triangulation/test_delaunay.cpp +++ b/Triangulation/test/Triangulation/test_delaunay.cpp @@ -10,6 +10,7 @@ int main() #else #include +#include #include #include #include @@ -112,13 +113,21 @@ void test(const int d, const string & type, const int N) template< int D > void go(const int N) { - typedef CGAL::Epick_d > FK; - typedef CGAL::Delaunay_triangulation Triangulation; + typedef CGAL::Epick_d > KI; + typedef CGAL::Delaunay_triangulation Triangulation; test(D, "static", N); - typedef CGAL::Epick_d FK_dyn; - typedef CGAL::Delaunay_triangulation Triangulation_dyn; + typedef CGAL::Epick_d KI_dyn; + typedef CGAL::Delaunay_triangulation Triangulation_dyn; test(D, "dynamic", N); + + typedef CGAL::Epeck_d > KE; + typedef CGAL::Delaunay_triangulation TriangulationE; + test(D, "static", N); + + typedef CGAL::Epeck_d KE_dyn; + typedef CGAL::Delaunay_triangulation TriangulationE_dyn; + test(D, "dynamic", N); } int main(int argc, char **argv) diff --git a/Triangulation/test/Triangulation/test_regular.cpp b/Triangulation/test/Triangulation/test_regular.cpp index f124b1ddabf..c044e663f0e 100644 --- a/Triangulation/test/Triangulation/test_regular.cpp +++ b/Triangulation/test/Triangulation/test_regular.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -93,13 +94,21 @@ void test(const int d, const string & type, const int N) template< int D > void go(const int N) { - typedef CGAL::Epick_d > FK; - typedef CGAL::Regular_triangulation Triangulation; - test(D, "static", N); + typedef CGAL::Epick_d > KI; + typedef CGAL::Regular_triangulation Triangulation; + test(D, "inexact static", N); - typedef CGAL::Epick_d FK_dyn; - typedef CGAL::Regular_triangulation Triangulation_dyn; - test(D, "dynamic", N); + typedef CGAL::Epick_d KI_dyn; + typedef CGAL::Regular_triangulation Triangulation_dyn; + test(D, "inexact dynamic", N); + + typedef CGAL::Epeck_d > KE; + typedef CGAL::Regular_triangulation TriangulationE; + test(D, "exact static", N); + + typedef CGAL::Epeck_d KE_dyn; + typedef CGAL::Regular_triangulation TriangulationE_dyn; + test(D, "exact dynamic", N); } void test_inserting_points_at_the_same_position() From d7025ccf4448db60309b1b15c7c2d42f3f391bd0 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 23 Jan 2020 18:46:30 +0100 Subject: [PATCH 2/3] Print if this is testing Epick_d or Epeck_d --- Triangulation/test/Triangulation/test_delaunay.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Triangulation/test/Triangulation/test_delaunay.cpp b/Triangulation/test/Triangulation/test_delaunay.cpp index d98382e5530..4c105df3d2f 100644 --- a/Triangulation/test/Triangulation/test_delaunay.cpp +++ b/Triangulation/test/Triangulation/test_delaunay.cpp @@ -115,19 +115,19 @@ void go(const int N) { typedef CGAL::Epick_d > KI; typedef CGAL::Delaunay_triangulation Triangulation; - test(D, "static", N); + test(D, "inexact static", N); typedef CGAL::Epick_d KI_dyn; typedef CGAL::Delaunay_triangulation Triangulation_dyn; - test(D, "dynamic", N); + test(D, "inexact dynamic", N); typedef CGAL::Epeck_d > KE; typedef CGAL::Delaunay_triangulation TriangulationE; - test(D, "static", N); + test(D, "exact static", N); typedef CGAL::Epeck_d KE_dyn; typedef CGAL::Delaunay_triangulation TriangulationE_dyn; - test(D, "dynamic", N); + test(D, "exact dynamic", N); } int main(int argc, char **argv) From 0d1a89ac32d71bfd638e1d15ab2907682b394ea2 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 7 Feb 2020 17:17:44 +0100 Subject: [PATCH 3/3] Implement a workaround for MSVC 2015 See the compilation errors at: https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-5.1-Ic-68/Triangulation/TestReport_afabri_x64_Cygwin-Windows10_MSVC2015-Debug-64bits.gz --- NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h index 5e0e24254fe..7c3c8e01878 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h @@ -109,6 +109,12 @@ template, private EC { + // `default_construct()` is the same as `T{}`. But, this is a + // workaround to a MSVC-2015 bug (fixed in MSVC-2017): its parser + // seemed confused by `T{}` somewhere below. + template + static T default_construct() { return T(); } + // Lazy_rep_0 does not inherit from EC or take a parameter AC. It has different constructors. static_assert(sizeof...(L)>0, "Use Lazy_rep_0 instead"); template friend class Lazy_kernel_base; @@ -138,7 +144,7 @@ class Lazy_rep_XXX : // Currently we construct the vectors, then move them into the tuple. It would be nicer to construct them in their final destination, because eventually we will also have arrays instead of vectors. template Lazy_rep_XXX(Lazy_internal::typelist, const AC& ac, const EC& ec, LLL const&lll, LL const&...ll) : - Lazy_rep(ac(CGAL::approx(ll)...)), EC(ec), l(Lazy_internal::do_extract(T{},lll)...) + Lazy_rep(ac(CGAL::approx(ll)...)), EC(ec), l(Lazy_internal::do_extract(default_construct(),lll)...) { //this->set_depth(std::max({ -1, (int)CGAL::depth(ll)...}) + 1); this->set_depth(1); // FIXME: now that we have ranges, we could actually compute the depth if we cared...