From ac21a08c130b3096669548d18abb13cdd655380f Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Thu, 23 May 2019 15:31:12 +0200 Subject: Cast Index to RealScalar This fixes compilation issues with RealScalar types that are not implicitly castable from Index (e.g. ceres Jet types). Reported by Peter Anderson-Sprecher via eMail --- Eigen/src/SVD/SVDBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/SVD') diff --git a/Eigen/src/SVD/SVDBase.h b/Eigen/src/SVD/SVDBase.h index 68df48921..34d5c9dd3 100644 --- a/Eigen/src/SVD/SVDBase.h +++ b/Eigen/src/SVD/SVDBase.h @@ -198,7 +198,7 @@ public: // this temporary is needed to workaround a MSVC issue Index diagSize = (std::max)(1,m_diagSize); return m_usePrescribedThreshold ? m_prescribedThreshold - : diagSize*NumTraits::epsilon(); + : RealScalar(diagSize)*NumTraits::epsilon(); } /** \returns true if \a U (full or thin) is asked for in this SVD decomposition */ -- cgit v1.2.3