aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CommaInitializer.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2020-04-13 16:41:20 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2020-04-13 16:41:20 +0200
commitd46d726e9d06416c7d1d5a81bdeae04c629f93d8 (patch)
tree8ec04276f6ef722dfd7b5f3baceba54af85e3fad /Eigen/src/Core/CommaInitializer.h
parentc854e189e6d4868fedc7d4ef81cc3485f5b24841 (diff)
CommaInitializer wrongfully asserted for 0-sized blocks
commainitialier unit-test never actually called `test_block_recursion`, which also was not correctly implemented and would have caused too deep template recursion.
Diffstat (limited to 'Eigen/src/Core/CommaInitializer.h')
-rw-r--r--Eigen/src/Core/CommaInitializer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h
index 53066c653..c0e29c75c 100644
--- a/Eigen/src/Core/CommaInitializer.h
+++ b/Eigen/src/Core/CommaInitializer.h
@@ -43,7 +43,7 @@ struct CommaInitializer
inline CommaInitializer(XprType& xpr, const DenseBase<OtherDerived>& other)
: m_xpr(xpr), m_row(0), m_col(other.cols()), m_currentBlockRows(other.rows())
{
- eigen_assert(m_xpr.rows() > 0 && m_xpr.cols() > 0
+ eigen_assert(m_xpr.rows() >= other.rows() && m_xpr.cols() >= other.cols()
&& "Cannot comma-initialize a 0x0 matrix (operator<<)");
m_xpr.block(0, 0, other.rows(), other.cols()) = other;
}