From 8e19027130b1e31cfab4e09b67c155c07cf85ff6 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 20 Jul 2014 14:03:22 +0200 Subject: [PATCH] bug #826: fix 64 to 32 bits conversion warning when calling Matrix(long) --- Eigen/src/Core/PlainObjectBase.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index ae5b342ce..e4e3e8903 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -705,6 +705,17 @@ class PlainObjectBase : public internal::dense_xpr_base::type EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1) m_storage.data()[0] = val0; } + + template + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(const Index& val0, + typename internal::enable_if< (!internal::is_same::value) + && Base::SizeAtCompileTime==1 + && internal::is_convertible::value,T>::type* = 0) + { + EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1) + m_storage.data()[0] = Scalar(val0); + } template EIGEN_DEVICE_FUNC