CGAL 6.0.1 + long double (problem in CGAL library)

With CGAL 6.0.1 we have a compilation error in /usr/include/CGAL/convex_hull_3.h:337 where CGAL tries to downconvert from long double to double and ThinRealWrapper<long double> does not allow this:

  bool operator() (const Point_3& s) const
  {
    double psx = s.x() - p.x();
    double psy = s.y() - p.y();
    double psz = s.z() - p.z();
//...

But allowing this (by removing the explicit keyword from here) causes thousands of compilation errors in other places. At the same time float128 (33 decimal places) and MPFR (150 decimal places) work well. Only at version 6.0.1 CGAL started to have problem with ThinRealWrapper<long double>. I don't know why.

But even before version 6.0.1 CGAL worked unreliably with long double (I think since 2023). We had Polyhedra yade --check failures, even though it was compiling. Now it stopped compiling. So this bug is a bit deeper than at first sight.

I opened this issue here to track progress with this problem.

I think the bug is in CGAL library. We need to report it to CGAL.

What we have so far:

  • CGAL 6.0.1 - yade does not compile with long double
  • CGAL 5.5.1 - yade is compiling, but Polyhedron tests do not pass with long double
  • CGAL 5.4 - yade is compiling, but Polyhedron tests do not pass with long double
  • CGAL 5.2 - yade is compiling and Polyhedron tests pass without any problem with long double

See also Polyhedra mother issue: #242

Edited by Janek Kozicki