aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/Eigen2Support/Minor.h2
-rw-r--r--test/eigen2/submatrices.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/Eigen/src/Eigen2Support/Minor.h b/Eigen/src/Eigen2Support/Minor.h
index 3b3acd605..eda91cc32 100644
--- a/Eigen/src/Eigen2Support/Minor.h
+++ b/Eigen/src/Eigen2Support/Minor.h
@@ -56,7 +56,7 @@ struct traits<Minor<MatrixType> >
int(MatrixType::MaxRowsAtCompileTime) - 1 : Dynamic,
MaxColsAtCompileTime = (MatrixType::MaxColsAtCompileTime != Dynamic) ?
int(MatrixType::MaxColsAtCompileTime) - 1 : Dynamic,
- Flags = _MatrixTypeNested::Flags & HereditaryBits,
+ Flags = _MatrixTypeNested::Flags & (HereditaryBits | LvalueBit),
CoeffReadCost = _MatrixTypeNested::CoeffReadCost // minor is used typically on tiny matrices,
// where loops are unrolled and the 'if' evaluates at compile time
};
diff --git a/test/eigen2/submatrices.cpp b/test/eigen2/submatrices.cpp
index 63c61baca..71bb65482 100644
--- a/test/eigen2/submatrices.cpp
+++ b/test/eigen2/submatrices.cpp
@@ -111,8 +111,10 @@ template<typename MatrixType> void submatrices(const MatrixType& m)
m2.diagonal()[0] *= 3;
VERIFY_IS_APPROX(m2.diagonal()[0], static_cast<Scalar>(6) * m1.diagonal()[0]);
- const int BlockRows = EIGEN_ENUM_MIN(MatrixType::RowsAtCompileTime,2);
- const int BlockCols = EIGEN_ENUM_MIN(MatrixType::ColsAtCompileTime,5);
+ enum {
+ BlockRows = EIGEN_SIZE_MIN_PREFER_FIXED(MatrixType::RowsAtCompileTime,2),
+ BlockCols = EIGEN_SIZE_MIN_PREFER_FIXED(MatrixType::ColsAtCompileTime,5)
+ };
if (rows>=5 && cols>=8)
{
// test fixed block() as lvalue