fix(CommaInitializer): pass dims at compile-time

This commit is contained in:
Yann Billeter 2021-10-25 10:39:25 +02:00 committed by Rasmus Munk Larsen
parent a500da1dc0
commit 6c3206152a

View File

@ -47,7 +47,7 @@ struct CommaInitializer
{ {
eigen_assert(m_xpr.rows() >= other.rows() && m_xpr.cols() >= other.cols() eigen_assert(m_xpr.rows() >= other.rows() && m_xpr.cols() >= other.cols()
&& "Cannot comma-initialize a 0x0 matrix (operator<<)"); && "Cannot comma-initialize a 0x0 matrix (operator<<)");
m_xpr.block(0, 0, other.rows(), other.cols()) = other; m_xpr.template block<OtherDerived::RowsAtCompileTime, OtherDerived::ColsAtCompileTime>(0, 0, other.rows(), other.cols()) = other;
} }
/* Copy/Move constructor which transfers ownership. This is crucial in /* Copy/Move constructor which transfers ownership. This is crucial in