aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-08-06 15:03:37 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-08-06 15:03:37 +0200
commit03febf00a0f4bff41bb4d1ea222bf378c305ef1f (patch)
tree6e4e259dd414a4ee44d6917fa95a74b53445680e /Eigen/src
parent2e46e9f2b487a249f0374128bd5b8217ca81a278 (diff)
fix VS compilation issue in MapBase::operator+= and -=
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/MapBase.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h
index 20103408b..5bdf59fbc 100644
--- a/Eigen/src/Core/MapBase.h
+++ b/Eigen/src/Core/MapBase.h
@@ -173,16 +173,18 @@ template<typename Derived> class MapBase
using Base::operator=;
using Base::operator*=;
- using Base::operator+=;
- using Base::operator-=;
-
-// template<typename Lhs,typename Rhs>
-// Derived& operator+=(const Flagged<Product<Lhs,Rhs,CacheFriendlyProduct>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other)
-// { return Base::operator+=(other); }
-//
-// template<typename Lhs,typename Rhs>
-// Derived& operator-=(const Flagged<Product<Lhs,Rhs,CacheFriendlyProduct>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other)
-// { return Base::operator-=(other); }
+
+ // FIXME it seems VS does not allow to do "using Base::operator+="
+ // and to overload operator+= at the same time, therefore we have to
+ // explicitly add these two overloads.
+ // Maye their exists a better solution though.
+ template<typename ProductDerived, typename Lhs,typename Rhs>
+ Derived& operator+=(const Flagged<ProductBase<ProductDerived,Lhs,Rhs>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other)
+ { return Base::operator+=(other); }
+
+ template<typename ProductDerived, typename Lhs,typename Rhs>
+ Derived& operator-=(const Flagged<ProductBase<ProductDerived,Lhs,Rhs>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other)
+ { return Base::operator-=(other); }
template<typename OtherDerived>
Derived& operator+=(const MatrixBase<OtherDerived>& other)