diff options
author | Miao Wang <miaowang@google.com> | 2017-07-06 22:33:01 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-07-06 22:33:01 +0000 |
commit | 2468c2ff45d4443b07440c4063f5f1cabe4da65a (patch) | |
tree | 28a6fbea7c5a1e9a0f1a209f8d33e6d72f1df851 /unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | |
parent | 457e53bce95b3700e984cffd2ef8cfba1789ec6d (diff) | |
parent | 63687fa8cbebcbae3d0a48a6c5d63677ffa6160e (diff) | |
download | eigen-2468c2ff45d4443b07440c4063f5f1cabe4da65a.tar.gz |
Merge "Rebase Eigen to 3.3.4" am: c905f05b1b
am: 63687fa8cb
Change-Id: Id4ec05eaa5243187830cb5826b13b94ffcff64ba
Diffstat (limited to 'unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h')
-rwxr-xr-x | unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index 50fedf6ac..279fe5cd3 100755 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -108,7 +108,9 @@ class AutoDiffScalar template<typename OtherDerType> AutoDiffScalar(const AutoDiffScalar<OtherDerType>& other #ifndef EIGEN_PARSED_BY_DOXYGEN - , typename internal::enable_if<internal::is_same<Scalar, typename internal::traits<typename internal::remove_all<OtherDerType>::type>::Scalar>::value,void*>::type = 0 + , typename internal::enable_if< + internal::is_same<Scalar, typename internal::traits<typename internal::remove_all<OtherDerType>::type>::Scalar>::value + && internal::is_convertible<OtherDerType,DerType>::value , void*>::type = 0 #endif ) : m_value(other.value()), m_derivatives(other.derivatives()) @@ -681,4 +683,11 @@ template<typename DerType> struct NumTraits<AutoDiffScalar<DerType> > } +namespace std { +template <typename T> +class numeric_limits<Eigen::AutoDiffScalar<T> > + : public numeric_limits<typename T::Scalar> {}; + +} // namespace std + #endif // EIGEN_AUTODIFF_SCALAR_H |