Added comparisons scalar to array (previously only the array to scalar was possible) (Fixes bug #147)

Extended the unit test for that
This commit is contained in:
Christoph Hertzberg
2013-10-17 15:37:29 +02:00
parent 3d2a3bc755
commit 36052c4911
2 changed files with 15 additions and 4 deletions

View File

@@ -191,6 +191,11 @@ cube() const
METHOD_NAME(const Scalar& s) const { \
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >, const Derived> \
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
} \
friend inline const CwiseUnaryOp<std::binder1st<FUNCTOR<Scalar> >, const Derived> \
METHOD_NAME(const Scalar& s, const Derived& d) { \
return CwiseUnaryOp<std::binder1st<FUNCTOR<Scalar> >, const Derived> \
(d, std::bind1st(FUNCTOR<Scalar>(), s)); \
}
EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator==, std::equal_to)