mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-17 03:43:13 +08:00
improve compilation error message for array+=matrix and the likes
This commit is contained in:
parent
453d54325e
commit
c625a6a85b
@ -167,6 +167,11 @@ template<typename Derived> class ArrayBase
|
|||||||
explicit ArrayBase(Index);
|
explicit ArrayBase(Index);
|
||||||
ArrayBase(Index,Index);
|
ArrayBase(Index,Index);
|
||||||
template<typename OtherDerived> explicit ArrayBase(const ArrayBase<OtherDerived>&);
|
template<typename OtherDerived> explicit ArrayBase(const ArrayBase<OtherDerived>&);
|
||||||
|
protected:
|
||||||
|
// mixing arrays and matrices is not legal
|
||||||
|
template<typename OtherDerived> Derived& operator+=(const MatrixBase<OtherDerived>& mat);
|
||||||
|
// mixing arrays and matrices is not legal
|
||||||
|
template<typename OtherDerived> Derived& operator-=(const MatrixBase<OtherDerived>& mat);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** replaces \c *this by \c *this - \a other.
|
/** replaces \c *this by \c *this - \a other.
|
||||||
|
@ -427,6 +427,11 @@ template<typename Derived> class MatrixBase
|
|||||||
explicit MatrixBase(int);
|
explicit MatrixBase(int);
|
||||||
MatrixBase(int,int);
|
MatrixBase(int,int);
|
||||||
template<typename OtherDerived> explicit MatrixBase(const MatrixBase<OtherDerived>&);
|
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
|
#endif // EIGEN_MATRIXBASE_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user