bug #1451: fix numeric_limits<AutoDiffScalar<Der>> with a reference as derivative type

This commit is contained in:
Gael Guennebaud 2018-08-04 00:17:37 +02:00
parent 7f8b53fd0e
commit 09c81ac033

View File

@ -684,10 +684,15 @@ template<typename DerType> struct NumTraits<AutoDiffScalar<DerType> >
}
namespace std {
template <typename T>
class numeric_limits<Eigen::AutoDiffScalar<T> >
: public numeric_limits<typename T::Scalar> {};
template <typename T>
class numeric_limits<Eigen::AutoDiffScalar<T&> >
: public numeric_limits<typename T::Scalar> {};
} // namespace std
#endif // EIGEN_AUTODIFF_SCALAR_H