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

Copied input type from `EIGEN_MAKE_CWISE_BINARY_OP`.

Fixes #2362.


(cherry picked from commit 03d4cbb30796ea06350414f5f551b180e4864688)
This commit is contained in:
Antonio Sanchez 2021-10-28 09:28:29 -07:00 committed by Antonio Sánchez
parent 96007cae8c
commit 6b6ba41269

View File

@ -38,7 +38,7 @@ min
#else
(min)
#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());
}
@ -102,7 +102,7 @@ max
#else
(max)
#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());
}