From bc6625ab870f7d7c26b21d0ad287edbddb8815a9 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 6 Feb 2011 11:57:04 -0500 Subject: [PATCH] fix const correctness in Diagonal::coeffRef (fix found by failtests) --- Eigen/src/Core/Diagonal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h index 222a5be64..0fa374101 100644 --- a/Eigen/src/Core/Diagonal.h +++ b/Eigen/src/Core/Diagonal.h @@ -103,6 +103,7 @@ template class Diagonal inline Scalar& coeffRef(Index row, Index) { + EIGEN_STATIC_ASSERT_LVALUE(MatrixType) return m_matrix.const_cast_derived().coeffRef(row+rowOffset(), row+colOffset()); } @@ -118,6 +119,7 @@ template class Diagonal inline Scalar& coeffRef(Index index) { + EIGEN_STATIC_ASSERT_LVALUE(MatrixType) return m_matrix.const_cast_derived().coeffRef(index+rowOffset(), index+colOffset()); }