From 4387298e806ff58bb25e7d6cb05018960f470276 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Thu, 23 May 2019 15:31:12 +0200 Subject: [PATCH] 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 (grafted from ac21a08c130b3096669548d18abb13cdd655380f ) --- Eigen/src/SVD/SVDBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/SVD/SVDBase.h b/Eigen/src/SVD/SVDBase.h index 3d1ef373e..53da28488 100644 --- a/Eigen/src/SVD/SVDBase.h +++ b/Eigen/src/SVD/SVDBase.h @@ -183,7 +183,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 */