diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 1273248d080..5d7b22ec37b 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -111,14 +111,24 @@ templateinline std::enable_if_t::value, T> approx(T){r templateinline std::enable_if_t::value, int> depth(T){return -1;} namespace internal{ -template -struct Evaluate> -{ - void operator()(const Lazy& l) + + template + struct Evaluate> { - exact(l); - } + void operator()(const Lazy& l) + { + exact(l); + } }; + + template + struct Evaluate> + { + void operator()(const Lazy_exact_nt& l) + { + exact(l); + } + }; } // internal namespace // For an iterator, exact/approx applies to the objects it points to diff --git a/Polygon/test/Polygon/issue7934.cpp b/Polygon/test/Polygon/issue7934.cpp new file mode 100644 index 00000000000..ca9128cc835 --- /dev/null +++ b/Polygon/test/Polygon/issue7934.cpp @@ -0,0 +1,22 @@ +#include +#include +#include +#include + +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +using Point_2 = Kernel::Point_2; +using Polygon_2 = CGAL::Polygon_2; + +int main() +{ + Polygon_2 polygon; + for (int i = 0; i < 200000; ++i) { + polygon.push_back(Point_2(i* 1.04663, 0)); + } + polygon.push_back(Point_2( 3.1415, 3.1415)); + + auto ar = CGAL::polygon_area_2(polygon.vertices_begin(), polygon.vertices_end(), Kernel()); + + std::cout << "done" << std::endl; + return 0; +} \ No newline at end of file