Fix min/max nan-propagation for scalar "other".

Copied input type from `EIGEN_MAKE_CWISE_BINARY_OP`.

Fixes #2362.
This commit is contained in:
Antonio Sanchez 2021-10-28 09:28:29 -07:00
parent e559701981
commit 03d4cbb307

View File

@ -38,7 +38,7 @@ min
#else #else
(min) (min)
#endif #endif
(const OtherDerived &other) const (const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{ {
return CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived()); return CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived());
} }
@ -76,7 +76,7 @@ max
#else #else
(max) (max)
#endif #endif
(const OtherDerived &other) const (const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{ {
return CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived()); return CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived());
} }