diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index e20daacc8..5624a4718 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -213,8 +213,12 @@ template EIGEN_STRONG_INLINE Derived & MatrixBase::operator-=(const MatrixBase &other) { +#ifdef EIGEN_TEST_EVALUATORS + call_assignment(derived(), other.derived(), internal::sub_assign_op()); +#else SelfCwiseBinaryOp, Derived, OtherDerived> tmp(derived()); tmp = other.derived(); +#endif return derived(); } @@ -227,8 +231,12 @@ template EIGEN_STRONG_INLINE Derived & MatrixBase::operator+=(const MatrixBase& other) { +#ifdef EIGEN_TEST_EVALUATORS + call_assignment(derived(), other.derived(), internal::add_assign_op()); +#else SelfCwiseBinaryOp, Derived, OtherDerived> tmp(derived()); tmp = other.derived(); +#endif return derived(); } diff --git a/Eigen/src/Core/NoAlias.h b/Eigen/src/Core/NoAlias.h index 3c9c951f0..412e37258 100644 --- a/Eigen/src/Core/NoAlias.h +++ b/Eigen/src/Core/NoAlias.h @@ -41,7 +41,7 @@ class NoAlias EIGEN_STRONG_INLINE ExpressionType& operator=(const StorageBase& other) { // TODO either call resize here or call "call_assignment" through m_expression.lazyAssign() ?? - m_expression.resizeLike(other.derived()); + m_expression.resize(other.derived().rows(), other.derived().cols()); call_assignment(*this, other.derived(), internal::assign_op()); return m_expression; }