From f4e90e943dd368b76f466c91075193124c191ef5 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Fri, 21 Oct 2022 17:16:01 +0200 Subject: Remove strange behavior with initializer list --- src/Alpha_complex/include/gudhi/Alpha_complex.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index d5d1a0f0..7b837ae0 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -45,7 +45,6 @@ #include #include // for std::iota #include // for std::sort -#include // for complex.insert_simplex_and_subfaces({...}, ...) // Make compilation fail - required for external projects - https://github.com/GUDHI/gudhi-devel/issues/10 #if CGAL_VERSION_NR < 1041101000 @@ -394,11 +393,13 @@ class Alpha_complex { // -------------------------------------------------------------------------------------------- // Simplex_tree construction from loop on triangulation finite full cells list if (num_vertices() > 0) { + std::vector one_vertex(1); for (auto vertex : vertices_) { #ifdef DEBUG_TRACES std::clog << "SimplicialComplex insertion " << vertex << std::endl; #endif // DEBUG_TRACES - complex.insert_simplex_and_subfaces({static_cast(vertex)}, std::numeric_limits::quiet_NaN()); + one_vertex[0] = vertex; + complex.insert_simplex_and_subfaces(one_vertex, std::numeric_limits::quiet_NaN()); } for (auto cit = triangulation_->finite_full_cells_begin(); -- cgit v1.2.3