diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-05-27 23:07:29 +0200 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-05-27 23:07:29 +0200 |
commit | 86be59124df620ef86da1261842845bd61e68e52 (patch) | |
tree | 82ef7c7fb4153ab211d7f158ced07707a912bc4d /Eigen | |
parent | 4d1e492c00c245b2cf44d016d79c4ba5f0d3d396 (diff) |
fix the static assert checking the size template parameters.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/Matrix.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 4d97d61d2..d75d61413 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -530,8 +530,14 @@ class Matrix static EIGEN_STRONG_INLINE void _check_template_params() { - EIGEN_STATIC_ASSERT(((_MaxRows >= _Rows || _Rows==Dynamic) - && (_MaxCols >= _Cols || _Cols==Dynamic) + EIGEN_STATIC_ASSERT(((_Rows >= _MaxRows) + && (_Cols >= _MaxCols) + && (_MaxRows >= 1) + && (_MaxCols >= 1) + && (_Rows <= Dynamic) + && (_Cols <= Dynamic) + && (_MaxRows == _Rows || _Rows==Dynamic) + && (_MaxCols == _Cols || _Cols==Dynamic) && ((_MaxRows==Dynamic?1:_MaxRows)*(_MaxCols==Dynamic?1:_MaxCols)<Dynamic) && (_Options & (DontAlign|RowMajor)) == _Options), INVALID_MATRIX_TEMPLATE_PARAMETERS) |