diff --git a/dlib/math/bessel.h b/dlib/math/bessel.h index cacb3b5ad..f8ff24e4c 100644 --- a/dlib/math/bessel.h +++ b/dlib/math/bessel.h @@ -17,7 +17,8 @@ namespace dlib - works with C++11 onwards !*/ { - return detail::cyl_bessel_i>(nu, x); + using R = std::common_type_t; + return detail::cyl_bessel_i((R)nu, (R)x); } template @@ -30,7 +31,8 @@ namespace dlib - works with C++11 onwards !*/ { - return detail::cyl_bessel_j>(nu, x); + using R = std::common_type_t; + return detail::cyl_bessel_j((R)nu, (R)x); } }