diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-08-04 00:17:37 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-08-04 00:17:37 +0200 |
commit | 09c81ac03335584674371369d0045510dc83aba4 (patch) | |
tree | a89639c3cb118fb2587bc215ec16fbf21952448a /unsupported/Eigen/src/AutoDiff | |
parent | 7f8b53fd0e359aa2b1a588489f31135a8c52b55f (diff) |
bug #1451: fix numeric_limits<AutoDiffScalar<Der>> with a reference as derivative type
Diffstat (limited to 'unsupported/Eigen/src/AutoDiff')
-rwxr-xr-x | unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index 279fe5cd3..13d959df4 100755 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -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 |