fix nesting lazy prod by ref

This commit is contained in:
Gael Guennebaud 2010-02-09 11:27:30 +01:00
parent d104d2cd29
commit 1cb59e4781
2 changed files with 3 additions and 3 deletions

View File

@ -72,11 +72,11 @@ class NoAlias
template<typename Lhs, typename Rhs, int NestingFlags>
EIGEN_STRONG_INLINE ExpressionType& operator+=(const CoeffBasedProduct<Lhs,Rhs,NestingFlags>& other)
{ return m_expression.derived() += CoeffBasedProduct<Lhs,Rhs,0>(other.lhs(), other.rhs()); }
{ return m_expression.derived() += CoeffBasedProduct<Lhs,Rhs,NestByRefBit>(other.lhs(), other.rhs()); }
template<typename Lhs, typename Rhs, int NestingFlags>
EIGEN_STRONG_INLINE ExpressionType& operator-=(const CoeffBasedProduct<Lhs,Rhs,NestingFlags>& other)
{ return m_expression.derived() -= CoeffBasedProduct<Lhs,Rhs,0>(other.lhs(), other.rhs()); }
{ return m_expression.derived() -= CoeffBasedProduct<Lhs,Rhs,NestByRefBit>(other.lhs(), other.rhs()); }
#endif
protected:

View File

@ -146,7 +146,7 @@ struct ProductReturnType<Lhs,Rhs,LazyCoeffBasedProductMode>
{
typedef typename ei_nested<Lhs, Rhs::ColsAtCompileTime, typename ei_plain_matrix_type<Lhs>::type >::type LhsNested;
typedef typename ei_nested<Rhs, Lhs::RowsAtCompileTime, typename ei_plain_matrix_type<Rhs>::type >::type RhsNested;
typedef CoeffBasedProduct<LhsNested, RhsNested, 0> Type;
typedef CoeffBasedProduct<LhsNested, RhsNested, NestByRefBit> Type;
};