diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 87eb65bda..e4a74d7f0 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -257,7 +257,7 @@ struct evaluator> : evaluator_base { plainobjectbase_evaluator_data m_d; private: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index getIndex(Index row, Index col) const { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index constexpr getIndex(Index row, Index col) const { return IsRowMajor ? row * m_d.outerStride() + col : row + col * m_d.outerStride(); } };