Fix warning and remove checking of empty matrices (not supported by 3.2)

This commit is contained in:
Gael Guennebaud 2016-07-18 13:59:43 +02:00
parent 2a3680da3d
commit 80e72a2653
2 changed files with 1 additions and 23 deletions

View File

@ -89,7 +89,7 @@ struct CommaInitializer
eigen_assert(m_row+m_currentBlockRows<=m_xpr.rows()
&& "Too many rows passed to comma initializer (operator<<)");
}
eigen_assert(m_col<m_xpr.cols() || (m_xpr.cols()==0 && m_col==0)
eigen_assert((m_col<m_xpr.cols() || (m_xpr.cols()==0 && m_col==0))
&& "Too many coefficients passed to comma initializer (operator<<)");
eigen_assert(m_currentBlockRows==other.rows());
if (OtherDerived::SizeAtCompileTime != Dynamic)

View File

@ -44,26 +44,4 @@ void test_commainitializer()
vec[2].transpose();
VERIFY_IS_APPROX(m3, ref);
// Check with empty matrices (bug #1242)
{
int const M = 0;
int const N1 = 2;
int const N2 = 1;
{
Matrix<double, M, N1> A1;
Matrix<double, M, N2> A2;
Matrix<double, M, N1 + N2> B;
B << A1, A2;
}
{
Matrix<double, N1, M> A1;
Matrix<double, N2, M> A2;
Matrix<double, N1 + N2, M> B;
B << A1,
A2;
}
}
}