mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
fix(CommaInitializer): pass dims at compile-time
This commit is contained in:
parent
a500da1dc0
commit
6c3206152a
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user