mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
further improve compilation error message for array+=matrix
This commit is contained in:
@@ -169,9 +169,11 @@ template<typename Derived> class ArrayBase
|
||||
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);
|
||||
template<typename OtherDerived> Derived& operator+=(const MatrixBase<OtherDerived>& mat)
|
||||
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
||||
// mixing arrays and matrices is not legal
|
||||
template<typename OtherDerived> Derived& operator-=(const MatrixBase<OtherDerived>& mat);
|
||||
template<typename OtherDerived> Derived& operator-=(const MatrixBase<OtherDerived>& mat)
|
||||
{EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);}
|
||||
};
|
||||
|
||||
/** replaces \c *this by \c *this - \a other.
|
||||
|
||||
Reference in New Issue
Block a user