diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-07-20 14:03:22 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-07-20 14:03:22 +0200 |
commit | 8e19027130b1e31cfab4e09b67c155c07cf85ff6 (patch) | |
tree | 934cb51e7063996162b5a68f78207f01bce7579c /Eigen/src/Core/PlainObjectBase.h | |
parent | ef4a86d6b8eb7334ffa3a5a55f8432d723f8a502 (diff) |
bug #826: fix 64 to 32 bits conversion warning when calling Matrix<int,1,1>(long)
Diffstat (limited to 'Eigen/src/Core/PlainObjectBase.h')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 11 |
1 files changed, 11 insertions, 0 deletions
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<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 |