Fix bug #784: Assert if assigning a product to a triangularView does not match the size.

This commit is contained in:
Christoph Hertzberg 2014-04-04 17:48:37 +02:00
parent 8044b00a7f
commit 096af59799

View File

@ -265,6 +265,8 @@ template<typename MatrixType, unsigned int UpLo>
template<typename ProductDerived, typename _Lhs, typename _Rhs>
TriangularView<MatrixType,UpLo>& TriangularView<MatrixType,UpLo>::assignProduct(const ProductBase<ProductDerived, _Lhs,_Rhs>& prod, const Scalar& alpha)
{
eigen_assert(m_matrix.rows() == prod.rows() && m_matrix.cols() == prod.cols());
general_product_to_triangular_selector<MatrixType, ProductDerived, UpLo, (_Lhs::ColsAtCompileTime==1) || (_Rhs::RowsAtCompileTime==1)>::run(m_matrix.const_cast_derived(), prod.derived(), alpha);
return *this;