aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-02-06 11:57:04 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-02-06 11:57:04 -0500
commitbc6625ab870f7d7c26b21d0ad287edbddb8815a9 (patch)
tree66c7d315c87c69cfca54d80bc4cb0744c9088711 /Eigen/src
parentdab4e583cb28a8f1175d339a5a5894dd4ef8590e (diff)
fix const correctness in Diagonal::coeffRef (fix found by failtests)
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/Diagonal.h2
1 files changed, 2 insertions, 0 deletions
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<typename MatrixType, int DiagIndex> 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<typename MatrixType, int DiagIndex> class Diagonal
inline Scalar& coeffRef(Index index)
{
+ EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
return m_matrix.const_cast_derived().coeffRef(index+rowOffset(), index+colOffset());
}