bug #826: fix 64 to 32 bits conversion warning when calling Matrix<int,1,1>(long)

This commit is contained in:
Gael Guennebaud 2014-07-20 14:03:22 +02:00
parent ef4a86d6b8
commit 8e19027130

View File

@ -705,6 +705,17 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1)
m_storage.data()[0] = val0;
}
template<typename T>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE void _init1(const Index& val0,
typename internal::enable_if< (!internal::is_same<Index,Scalar>::value)
&& Base::SizeAtCompileTime==1
&& internal::is_convertible<T, Scalar>::value,T>::type* = 0)
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1)
m_storage.data()[0] = Scalar(val0);
}
template<typename T>
EIGEN_DEVICE_FUNC