mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
fix VS compilation issue in MapBase::operator+= and -=
This commit is contained in:
parent
2e46e9f2b4
commit
03febf00a0
@ -173,16 +173,18 @@ template<typename Derived> class MapBase
|
|||||||
|
|
||||||
using Base::operator=;
|
using Base::operator=;
|
||||||
using Base::operator*=;
|
using Base::operator*=;
|
||||||
using Base::operator+=;
|
|
||||||
using Base::operator-=;
|
|
||||||
|
|
||||||
// template<typename Lhs,typename Rhs>
|
// FIXME it seems VS does not allow to do "using Base::operator+="
|
||||||
// Derived& operator+=(const Flagged<Product<Lhs,Rhs,CacheFriendlyProduct>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other)
|
// and to overload operator+= at the same time, therefore we have to
|
||||||
// { return Base::operator+=(other); }
|
// explicitly add these two overloads.
|
||||||
//
|
// Maye their exists a better solution though.
|
||||||
// template<typename Lhs,typename Rhs>
|
template<typename ProductDerived, typename Lhs,typename Rhs>
|
||||||
// Derived& operator-=(const Flagged<Product<Lhs,Rhs,CacheFriendlyProduct>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other)
|
Derived& operator+=(const Flagged<ProductBase<ProductDerived,Lhs,Rhs>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other)
|
||||||
// { return Base::operator-=(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>
|
template<typename OtherDerived>
|
||||||
Derived& operator+=(const MatrixBase<OtherDerived>& other)
|
Derived& operator+=(const MatrixBase<OtherDerived>& other)
|
||||||
|
Loading…
Reference in New Issue
Block a user