diff --git a/Eigen/src/Core/Eval.h b/Eigen/src/Core/Eval.h index abb8cafcd..b41ee0d7c 100644 --- a/Eigen/src/Core/Eval.h +++ b/Eigen/src/Core/Eval.h @@ -55,13 +55,15 @@ template class Eval : NoOperatorEquals, { public: typedef typename Expression::Scalar Scalar; - typedef Matrix MatrixType; - typedef Expression Base; - friend class MatrixBase; - - Eval(const Expression& expression) : MatrixType(expression) {} + typedef Matrix Base; + + Eval() : Base() {} + explicit Eval(const Expression& other) : Base(other) {} }; /** Evaluates *this, which can be any expression, and returns the obtained matrix. diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 6a1d22fda..df68553bf 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -149,6 +149,19 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols, } public: + typedef Matrix< + Scalar, + RowsAtCompileTime == 1 ? 1 : Dynamic, + ColsAtCompileTime == 1 ? 1 : Dynamic, + StorageOrder, + RowsAtCompileTime == 1 ? 1 : MaxRowsAtCompileTime, + ColsAtCompileTime == 1 ? 1 : MaxColsAtCompileTime + > BlockType; + typedef Matrix ColumnType; + typedef Matrix RowType; + /** \returns a const pointer to the data array of this matrix */ const Scalar *data() const { return m_array.data(); }