diff --git a/Eigen/src/Core/ArrayBase.h b/Eigen/src/Core/ArrayBase.h index 941e39938..c53ea0a4f 100644 --- a/Eigen/src/Core/ArrayBase.h +++ b/Eigen/src/Core/ArrayBase.h @@ -167,6 +167,11 @@ template class ArrayBase explicit ArrayBase(Index); ArrayBase(Index,Index); template explicit ArrayBase(const ArrayBase&); + protected: + // mixing arrays and matrices is not legal + template Derived& operator+=(const MatrixBase& mat); + // mixing arrays and matrices is not legal + template Derived& operator-=(const MatrixBase& mat); }; /** replaces \c *this by \c *this - \a other. diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 0c2bbf5bf..1b0784c2b 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -427,6 +427,11 @@ template class MatrixBase explicit MatrixBase(int); MatrixBase(int,int); template explicit MatrixBase(const MatrixBase&); + protected: + // mixing arrays and matrices is not legal + template Derived& operator+=(const ArrayBase& array); + // mixing arrays and matrices is not legal + template Derived& operator-=(const ArrayBase& array); }; #endif // EIGEN_MATRIXBASE_H