aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CommaInitializer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/CommaInitializer.h')
-rw-r--r--Eigen/src/Core/CommaInitializer.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h
index d7a5fcb47..21551ccf2 100644
--- a/Eigen/src/Core/CommaInitializer.h
+++ b/Eigen/src/Core/CommaInitializer.h
@@ -76,9 +76,10 @@ struct MatrixBase<Derived>::CommaInitializer
ei_assert(m_col<m_matrix.cols()
&& "Too many coefficients passed to MatrixBase::operator<<");
ei_assert(m_currentBlockRows==other.rows());
- if (OtherDerived::RowsAtCompileTime>0 && OtherDerived::ColsAtCompileTime>0)
- m_matrix.block< (OtherDerived::RowsAtCompileTime>0?OtherDerived::RowsAtCompileTime:1) ,
- (OtherDerived::ColsAtCompileTime>0?OtherDerived::ColsAtCompileTime:1) >(m_row, m_col) = other;
+ if (OtherDerived::SizeAtCompileTime != Dynamic)
+ m_matrix.block<OtherDerived::RowsAtCompileTime != Dynamic ? OtherDerived::RowsAtCompileTime : 1,
+ OtherDerived::ColsAtCompileTime != Dynamic ? OtherDerived::ColsAtCompileTime : 1>
+ (m_row, m_col) = other;
else
m_matrix.block(m_row, m_col, other.rows(), other.cols()) = other;
m_col += other.cols();