diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/curve.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/curve.h index 7a075982bf6..4e8e5c07b5c 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/curve.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/curve.h @@ -80,6 +80,7 @@ struct Get_rational_kernel { } static constexpr bool is_filtered = decltype(get_is_filtered())::value; + static constexpr bool is_floating_point = std::is_floating_point_v; static auto get_type() { @@ -89,7 +90,7 @@ struct Get_rational_kernel { } else { - if constexpr (std::is_floating_point_v) + if constexpr (is_floating_point) return CGAL::Simple_cartesian{}; else return K{}; @@ -104,6 +105,8 @@ template struct Curve_base { static constexpr bool is_filtered = Get_rational_kernel::is_filtered; + static constexpr bool is_floating_point = Get_rational_kernel::is_floating_point; + using distance_t = Interval_nt; using Kernel = typename T::Kernel; using iKernel = Kernel_d_interface>>; @@ -128,6 +131,7 @@ template struct Curve_base { static constexpr bool is_filtered = Get_rational_kernel::is_filtered; + static constexpr bool is_floating_point = Get_rational_kernel::is_floating_point; using distance_t = CGAL::Interval_nt; using Kernel = typename T::Kernel; @@ -153,6 +157,8 @@ template struct Curve_base { static constexpr bool is_filtered = Get_rational_kernel::is_filtered; + static constexpr bool is_floating_point = Get_rational_kernel::is_floating_point; + using distance_t = CGAL::Interval_nt; using Kernel = typename T::Kernel; using iKernel = CGAL::Simple_cartesian; @@ -189,6 +195,7 @@ public: static constexpr bool is_filtered = Base::is_filtered; + static constexpr bool is_floating_point = Base::is_floating_point; public: static constexpr int dimension = T::dimension; @@ -238,7 +245,7 @@ public: Curve(const PointRange& point_range) : prefix_length(point_range.size()) { - if constexpr ( ! std::is_floating_point::type::value) { + if constexpr ( ! is_floating_point) { input.reserve(point_range.size()); for (auto const& p : point_range) { input.push_back(p); @@ -287,7 +294,7 @@ public: Rational_point rpoint(PointID const& i) const { - if constexpr (std::is_floating_point::type::value) { + if constexpr (is_floating_point) { I2R convert; return convert(points[i]); }else{