From c657cb7dd3f77e161d0e3cc72461c64c628a30a7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 22 May 2025 10:24:35 +0200 Subject: [PATCH] try to workaround MSVC 2017 compilation error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the compilation error seems to be related to the conversion of cells iterators to cells handles, use a range-for loop, so that the iteration variable is directly a cell handle instead of an iterator. That might help MSVC 2017. --- .../include/CGAL/Periodic_3_mesh_3/IO/File_medit.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h index 950c7c976dd..a16d9872e19 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h @@ -253,24 +253,23 @@ void output_to_medit(std::ostream& os, for(int k=0; koffset(l))); + const Offset combined_off = tr.combine_offsets(off, tr.int_to_off(ch->offset(l))); const int vector_offset = combined_off.x() + combined_off.y() * (Ox_rn + 1) + combined_off.z() * (Ox_rn + 1) * (Oy_rn + 1); - const int id = vector_offset * number_of_vertices + V[cit->vertex(l)]; + const int id = vector_offset * number_of_vertices + V[ch->vertex(l)]; CGAL_assertion(1 <= id && id <= medit_number_of_vertices); os << id << " "; } // For multiple copies, color to distinguish copies rather than to distinguish subdomains if(!distinguish_copies || occ_mult == 1) - os << get(cell_pmap, cit) << '\n'; + os << get(cell_pmap, ch) << '\n'; else os << 1 + k + 3*j + 9*i << '\n'; } @@ -281,7 +280,7 @@ void output_to_medit(std::ostream& os, os << "End" << std::endl; } -template +template void output_to_medit(std::ostream& os, const C3T3& c3t3, const int occurrence_count, @@ -296,7 +295,7 @@ void output_to_medit(std::ostream& os, // periodic meshes always print facets twice because the facet in complex // might be on the boundary of the domain typedef CGAL::SMDS_3:: - Medit_pmap_generator Generator; typedef typename Generator::Cell_pmap Cell_pmap; typedef typename Generator::Facet_pmap Facet_pmap;