diff options
-rw-r--r-- | Eigen/src/Core/ArrayWrapper.h | 5 | ||||
-rw-r--r-- | Eigen/src/Core/Block.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h index d5b8c6804..f6b7f90a4 100644 --- a/Eigen/src/Core/ArrayWrapper.h +++ b/Eigen/src/Core/ArrayWrapper.h @@ -160,6 +160,11 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> > return m_expression.const_cast_derived().coeffRef(row, col); } + inline const Scalar& coeffRef(Index row, Index col) const + { + return m_expression.derived().coeffRef(row, col); + } + inline const CoeffReturnType coeff(Index index) const { return m_expression.coeff(index); diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 00d5d8b4e..de384b025 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -174,7 +174,7 @@ template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel, bool H inline const Scalar& coeffRef(Index row, Index col) const { - return m_xpr.const_cast_derived() + return m_xpr.derived() .coeffRef(row + m_startRow.value(), col + m_startCol.value()); } |