diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-08-16 11:07:17 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-08-16 11:07:17 +0200 |
commit | c625a6a85b8a6a805ee3e3dc5afe8555838415e4 (patch) | |
tree | d69a0a072003b77b2536eb2dff893c5118cb8660 /Eigen/src/Core/ArrayBase.h | |
parent | 453d54325e020746c00a141712e448dec42c0e2e (diff) |
improve compilation error message for array+=matrix and the likes
Diffstat (limited to 'Eigen/src/Core/ArrayBase.h')
-rw-r--r-- | Eigen/src/Core/ArrayBase.h | 5 |
1 files changed, 5 insertions, 0 deletions
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<typename Derived> class ArrayBase explicit ArrayBase(Index); ArrayBase(Index,Index); 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. |