Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive_sizing_field fails to compile with epeck #8717

Open
efifogel opened this issue Jan 27, 2025 · 1 comment
Open

Adaptive_sizing_field fails to compile with epeck #8717

efifogel opened this issue Jan 27, 2025 · 1 comment
Assignees
Milestone

Comments

@efifogel
Copy link
Member

Issue Details

The title says it all.
It fails on line 266:
vertex_size /= CGAL::halfedges_around_target(v, pmesh).size();
The following fixes it
vertex_size /= FT(CGAL::halfedges_around_target(v, pmesh).size());

Source Code

Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Adaptive_sizing_field.h

Environment

  • Operating system (Windows/Mac/Linux, 32/64 bits): Ubuntu 22.04, (64)
  • Compiler: gcc 11.4.0
  • Release or debug mode: both
  • Specific flags used (if any): none
  • CGAL version: 6.0.1
  • Boost version: irrelevant
  • Other libraries versions if used (Eigen, TBB, etc.):
@lrineau
Copy link
Member

lrineau commented Jan 28, 2025

The following fixes it
vertex_size /= FT(CGAL::halfedges_around_target(v, pmesh).size());

Actually, CGAL concept for our Kernel::FT types does not require that FT is constructible from std::size_t (returned by Iterator_range.size()), but only by int: concept FromIntConstructibl.

The correct code should be:

vertex_size /= FT(static_cast<int>(CGAL::halfedges_around_target(v, pmesh).size()));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants