Workaround warning: assuming signed overflow does not occur when...

This commit is contained in:
Gael Guennebaud 2013-02-26 10:29:24 +01:00
parent 5108ef01fc
commit b73baa1ea4

View File

@ -75,6 +75,7 @@ template<typename MatrixType> void cwiseops(const MatrixType& m)
Index cols = m.cols();
MatrixType m1 = MatrixType::Random(rows, cols),
m1bis = m1,
m2 = MatrixType::Random(rows, cols),
m3(rows, cols),
m4(rows, cols),
@ -164,8 +165,8 @@ template<typename MatrixType> void cwiseops(const MatrixType& m)
VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() );
VERIFY( (m1.cwise()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() );
VERIFY( !(m1.cwise()<m1.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() );
VERIFY( !(m1.cwise()>m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() );
VERIFY( !(m1.cwise()<m1bis.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() );
VERIFY( !(m1.cwise()>m1bis.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() );
cwiseops_real_only(m1, m2, m3, mones);
}