improve compilation error message for array+=matrix and the likes

This commit is contained in:
Gael Guennebaud
2010-08-16 11:07:17 +02:00
parent 453d54325e
commit c625a6a85b
2 changed files with 10 additions and 0 deletions

View File

@@ -427,6 +427,11 @@ template<typename Derived> class MatrixBase
explicit MatrixBase(int);
MatrixBase(int,int);
template<typename OtherDerived> explicit MatrixBase(const MatrixBase<OtherDerived>&);
protected:
// mixing arrays and matrices is not legal
template<typename OtherDerived> Derived& operator+=(const ArrayBase<OtherDerived>& array);
// mixing arrays and matrices is not legal
template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& array);
};
#endif // EIGEN_MATRIXBASE_H