Fixed compound subtraction in ArrayBase where the assignment needs to be carried out on the derived type.

Added unit tests for map based component wise arithmetic.
This commit is contained in:
Hauke Heibel
2010-12-16 17:34:13 +01:00
parent dbfb53e8ef
commit f578dc7aff
2 changed files with 49 additions and 30 deletions

View File

@@ -186,7 +186,7 @@ EIGEN_STRONG_INLINE Derived &
ArrayBase<Derived>::operator-=(const ArrayBase<OtherDerived> &other)
{
SelfCwiseBinaryOp<internal::scalar_difference_op<Scalar>, Derived, OtherDerived> tmp(derived());
tmp = other;
tmp = other.derived();
return derived();
}