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()); }