diff --git a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h index 144ec2695d2..f9bd5290086 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h @@ -28,6 +28,7 @@ #include #include +#include namespace CGAL { @@ -284,6 +285,15 @@ line_get_pointC2(const FT &a, const FT &b, const FT &c, int i, { if (CGAL_NTS is_zero(b)) { + // Laurent Rineau, 2018/12/07: I had this CGAL_assume to calm + // down a warning from MSVC 2017: + // > include\cgal\constructions\kernel_ftc2.h(287) : + // > warning C4723: potential divide by 0 + // The test `!boost::is_integral::value` is there to avoid + // that `a != 0` is tested on anything but integral types, for + // performance reasons. + CGAL_assume(!boost::is_integral::value || a != FT(0)); + x = -c/a; y = 1 - i * a; }