mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user