mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1451: fix numeric_limits<AutoDiffScalar<Der>> with a reference as derivative type
This commit is contained in:
@@ -684,10 +684,15 @@ template<typename DerType> struct NumTraits<AutoDiffScalar<DerType> >
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class numeric_limits<Eigen::AutoDiffScalar<T> >
|
class numeric_limits<Eigen::AutoDiffScalar<T> >
|
||||||
: public numeric_limits<typename T::Scalar> {};
|
: public numeric_limits<typename T::Scalar> {};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
class numeric_limits<Eigen::AutoDiffScalar<T&> >
|
||||||
|
: public numeric_limits<typename T::Scalar> {};
|
||||||
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#endif // EIGEN_AUTODIFF_SCALAR_H
|
#endif // EIGEN_AUTODIFF_SCALAR_H
|
||||||
|
|||||||
Reference in New Issue
Block a user