diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-07-10 22:04:45 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-07-10 22:04:45 +0200 |
commit | 296cb4016124d5c186ed65637888bb1c2c5fda2f (patch) | |
tree | f232c9aa62f8c581c7348226dc732d45d397a818 /Eigen/src/Core/PlainObjectBase.h | |
parent | 61b88d2feb8f23d1ba122f2c9a73abb183ebb25d (diff) | |
parent | d1460d92782ce0f7b90a8a52d44d50b44b167f98 (diff) |
merge with default branch
Diffstat (limited to 'Eigen/src/Core/PlainObjectBase.h')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index a81bf3540..8fd18b69d 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -713,7 +713,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type template<typename T> EIGEN_DEVICE_FUNC - EIGEN_STRONG_INLINE void _init1(Index size, typename internal::enable_if<Base::SizeAtCompileTime!=1,T>::type* = 0) + EIGEN_STRONG_INLINE void _init1(Index size, typename internal::enable_if<Base::SizeAtCompileTime!=1 || !internal::is_convertible<T, Scalar>::value,T>::type* = 0) { EIGEN_STATIC_ASSERT(bool(NumTraits<T>::IsInteger), FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) @@ -721,7 +721,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type } template<typename T> EIGEN_DEVICE_FUNC - EIGEN_STRONG_INLINE void _init1(const Scalar& val0, typename internal::enable_if<Base::SizeAtCompileTime==1,T>::type* = 0) + EIGEN_STRONG_INLINE void _init1(const Scalar& val0, typename internal::enable_if<Base::SizeAtCompileTime==1 && internal::is_convertible<T, Scalar>::value,T>::type* = 0) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1) m_storage.data()[0] = val0; |