mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-10 23:21:47 +08:00
bug #1401: fix compilation of "cond ? x : -x" with x an AutoDiffScalar
(grafted from 970ff78294503896940fb760d948f1eed156250f )
This commit is contained in:
parent
f2e6ee9687
commit
1865dccd58
@ -108,7 +108,9 @@ class AutoDiffScalar
|
|||||||
template<typename OtherDerType>
|
template<typename OtherDerType>
|
||||||
AutoDiffScalar(const AutoDiffScalar<OtherDerType>& other
|
AutoDiffScalar(const AutoDiffScalar<OtherDerType>& other
|
||||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
#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
|
#endif
|
||||||
)
|
)
|
||||||
: m_value(other.value()), m_derivatives(other.derivatives())
|
: m_value(other.value()), m_derivatives(other.derivatives())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user