This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 259 | Differences between
and this patch

Collapse All | Expand All

(-)a/Eigen/src/Core/Replicate.h (-1 / +2 lines)
Lines 128-134 Link Here
128
    }
128
    }
129
129
130
  protected:
130
  protected:
131
    const typename MatrixType::Nested m_matrix;
131
    typedef typename internal::eval<MatrixType>::type PlainObjectType;
132
    const PlainObjectType m_matrix;
132
    const internal::variable_if_dynamic<Index, RowFactor> m_rowFactor;
133
    const internal::variable_if_dynamic<Index, RowFactor> m_rowFactor;
133
    const internal::variable_if_dynamic<Index, ColFactor> m_colFactor;
134
    const internal::variable_if_dynamic<Index, ColFactor> m_colFactor;
134
};
135
};
(-)a/Eigen/src/Core/VectorwiseOp.h (-3 / +11 lines)
Lines 429-446 Link Here
429
    ExpressionType& operator+=(const DenseBase<OtherDerived>& other)
429
    ExpressionType& operator+=(const DenseBase<OtherDerived>& other)
430
    {
430
    {
431
      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
431
      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
432
433
      // nest expressions by value and plain objects by reference
434
      typedef typename internal::nested<MatrixType>::type PlainObjectType;
435
      const PlainObjectType other_nested(other.derived());
432
      for(Index j=0; j<subVectors(); ++j)
436
      for(Index j=0; j<subVectors(); ++j)
433
        subVector(j) += other.derived();
437
        subVector(j) += other_nested;
434
      return const_cast<ExpressionType&>(m_matrix);
438
      return const_cast<ExpressionType&>(m_matrix);
435
    }
439
    }
436
440
437
    /** Substracts the vector \a other to each subvector of \c *this */
441
    /** Subtracts the vector \a other to each subvector of \c *this */
438
    template<typename OtherDerived>
442
    template<typename OtherDerived>
439
    ExpressionType& operator-=(const DenseBase<OtherDerived>& other)
443
    ExpressionType& operator-=(const DenseBase<OtherDerived>& other)
440
    {
444
    {
441
      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
445
      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
446
447
      // nest expressions by value and plain objects by reference
448
      typedef typename internal::eval<OtherDerived>::type PlainObjectType;
449
      const PlainObjectType other_nested(other.derived());
442
      for(Index j=0; j<subVectors(); ++j)
450
      for(Index j=0; j<subVectors(); ++j)
443
        subVector(j) -= other.derived();
451
        subVector(j) -= other_nested;
444
      return const_cast<ExpressionType&>(m_matrix);
452
      return const_cast<ExpressionType&>(m_matrix);
445
    }
453
    }
446
454

Return to bug 259