diff --git a/src/internal/Minor.h b/src/internal/Minor.h index 1a1a15242..08086bbcc 100644 --- a/src/internal/Minor.h +++ b/src/internal/Minor.h @@ -36,8 +36,11 @@ template class EiMinor typedef EiMinor Ref; typedef EiMinor ConstRef; - static const int RowsAtCompileTime = MatrixType::RowsAtCompileTime - 1, - ColsAtCompileTime = MatrixType::ColsAtCompileTime - 1; + static const int + RowsAtCompileTime = (MatrixType::RowsAtCompileTime != EiDynamic) ? + MatrixType::RowsAtCompileTime - 1 : EiDynamic, + ColsAtCompileTime = (MatrixType::ColsAtCompileTime != EiDynamic) ? + MatrixType::ColsAtCompileTime - 1 : EiDynamic; EiMinor(const MatRef& matrix, int row, int col = 0)