diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-07-22 16:57:14 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-07-22 16:57:14 +0200 |
commit | 922694a2d1531b6c50fc26a96b7d998089da72bf (patch) | |
tree | c0ace91bf87bdb8a095a04d16a4c68c00c6a0959 /Eigen/src/Core/PlainObjectBase.h | |
parent | a8283e0ed2d3e42ba8e1c42f51cb08eacc301047 (diff) |
Extend fixed-size ctor unit test and fix conversion warning.
Diffstat (limited to 'Eigen/src/Core/PlainObjectBase.h')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index e4e3e8903..b968b325e 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -681,6 +681,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) resize(nbRows,nbCols); } + template<typename T0, typename T1> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(const Scalar& val0, const Scalar& val1, typename internal::enable_if<Base::SizeAtCompileTime==2,T0>::type* = 0) @@ -689,6 +690,15 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type m_storage.data()[0] = val0; m_storage.data()[1] = val1; } + + template<typename T0, typename T1> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1, typename internal::enable_if<(!internal::is_same<Index,Scalar>::value) && Base::SizeAtCompileTime==2,T1>::type* = 0) + { + EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2) + m_storage.data()[0] = Scalar(val0); + m_storage.data()[1] = Scalar(val1); + } template<typename T> EIGEN_DEVICE_FUNC |