From e1ecfc162d8390c29ae5c2943a2899fdd0bffe71 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Fri, 10 Jan 2020 21:14:08 +0000 Subject: [PATCH] call Explicitly ::rint and ::rintf for targets without c++11. Without this, the Windows build breaks when trying to compile numext::rint. --- Eigen/src/Core/MathFunctions.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index a681a3eb3..090ad43bd 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -450,11 +450,19 @@ struct rint_impl { #if !EIGEN_HAS_CXX11_MATH template<> +struct rint_impl { + EIGEN_DEVICE_FUNC + static inline double run(const double& x) + { + return ::rint(x); + } +}; +template<> struct rint_impl { EIGEN_DEVICE_FUNC static inline float run(const float& x) { - return rintf(x); + return ::rintf(x); } }; #endif