Fix detection of vector-at-time: use Rows/Cols instead of MaxRow/MaxCols.

This fix VectorXd(n).middleCol(0,0).outerSize() which was equal to 1.
This commit is contained in:
Gael Guennebaud
2019-01-15 15:09:49 +01:00
parent 32d7232aec
commit f8bc5cb39e
2 changed files with 19 additions and 6 deletions

View File

@@ -150,8 +150,8 @@ template<typename Derived> class DenseBase
* \sa SizeAtCompileTime, MaxRowsAtCompileTime, MaxColsAtCompileTime
*/
IsVectorAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime == 1
|| internal::traits<Derived>::MaxColsAtCompileTime == 1,
IsVectorAtCompileTime = internal::traits<Derived>::RowsAtCompileTime == 1
|| internal::traits<Derived>::ColsAtCompileTime == 1,
/**< This is set to true if either the number of rows or the number of
* columns is known at compile-time to be equal to 1. Indeed, in that case,
* we are dealing with a column-vector (if there is only one column) or with