aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/src/AutoDiff
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-08-04 00:17:37 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-08-04 00:17:37 +0200
commit09c81ac03335584674371369d0045510dc83aba4 (patch)
treea89639c3cb118fb2587bc215ec16fbf21952448a /unsupported/Eigen/src/AutoDiff
parent7f8b53fd0e359aa2b1a588489f31135a8c52b55f (diff)
bug #1451: fix numeric_limits<AutoDiffScalar<Der>> with a reference as derivative type
Diffstat (limited to 'unsupported/Eigen/src/AutoDiff')
-rwxr-xr-xunsupported/Eigen/src/AutoDiff/AutoDiffScalar.h5
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