Fix usage of nesting type in blas_traits. In practice, this fixes compilation of expressions such as A*(A*A)^T

where a product is hidden behind an expression supported by blas-traits.
This commit is contained in:
Gael Guennebaud
2016-03-29 22:39:12 +02:00
parent ea12669f7a
commit 4854326ae8
2 changed files with 28 additions and 16 deletions

View File

@@ -178,4 +178,12 @@ template<typename MatrixType> void product(const MatrixType& m)
// CwiseUnaryOp
VERIFY_IS_APPROX(x = Scalar(1.)*(A*x), A*z);
}
// regression for blas_trais
{
VERIFY_IS_APPROX(square * (square*square).transpose(), square * square.transpose() * square.transpose());
VERIFY_IS_APPROX(square * (-(square*square)), -square * square * square);
VERIFY_IS_APPROX(square * (s1*(square*square)), s1 * square * square * square);
VERIFY_IS_APPROX(square * (square*square).conjugate(), square * square.conjugate() * square.conjugate());
}
}