mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +08:00
bug #1401: fix compilation of "cond ? x : -x" with x an AutoDiffScalar
This commit is contained in:
parent
e5156e4d25
commit
970ff78294
@ -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