diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h index f6b7f90a4..7ba01de36 100644 --- a/Eigen/src/Core/ArrayWrapper.h +++ b/Eigen/src/Core/ArrayWrapper.h @@ -72,6 +72,11 @@ class ArrayWrapper : public ArrayBase > return m_expression.const_cast_derived().coeffRef(row, col); } + inline const Scalar& coeffRef(Index row, Index col) const + { + return m_expression.const_cast_derived().coeffRef(row, col); + } + inline const CoeffReturnType coeff(Index index) const { return m_expression.coeff(index); @@ -82,6 +87,11 @@ class ArrayWrapper : public ArrayBase > return m_expression.const_cast_derived().coeffRef(index); } + inline const Scalar& coeffRef(Index index) const + { + return m_expression.const_cast_derived().coeffRef(index); + } + template inline const PacketScalar packet(Index row, Index col) const { @@ -175,6 +185,11 @@ class MatrixWrapper : public MatrixBase > return m_expression.const_cast_derived().coeffRef(index); } + inline const Scalar& coeffRef(Index index) const + { + return m_expression.const_cast_derived().coeffRef(index); + } + template inline const PacketScalar packet(Index row, Index col) const {