* fix SelfCwiseBinaryOp traits and handling of mixed types

* improve compilation error in case of type mismatch
This commit is contained in:
Gael Guennebaud
2010-07-19 23:31:08 +02:00
parent 8b0b121c9e
commit 70b1ce11c6
8 changed files with 64 additions and 43 deletions

View File

@@ -303,11 +303,11 @@ inline void MatrixBase<Derived>::adjointInPlace()
// The following is to detect aliasing problems in most common cases.
template<typename BinOp,typename NestedXpr>
struct ei_blas_traits<SelfCwiseBinaryOp<BinOp,NestedXpr> >
template<typename BinOp,typename NestedXpr,typename Rhs>
struct ei_blas_traits<SelfCwiseBinaryOp<BinOp,NestedXpr,Rhs> >
: ei_blas_traits<NestedXpr>
{
typedef SelfCwiseBinaryOp<BinOp,NestedXpr> XprType;
typedef SelfCwiseBinaryOp<BinOp,NestedXpr,Rhs> XprType;
static inline const XprType extract(const XprType& x) { return x; }
};