diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2013-08-02 19:59:43 +0200 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2013-08-02 19:59:43 +0200 |
commit | 7c99b38b7c34c5a031e347b81277e67ab9cfdd93 (patch) | |
tree | 488f5619034985df75d10ec1bb7d196fa122e131 /Eigen/src/Core/PlainObjectBase.h | |
parent | b72a686830b95afd8941d3c4020eb936628b6398 (diff) |
Added move support for Matrix and Array.
Added EIGEN_HAVE_RVALUE_REFERENCES define.
Added move unit tests.
Removed superfluous 'inline' declarations in DenseStorage.
Diffstat (limited to 'Eigen/src/Core/PlainObjectBase.h')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index af0a479c7..e9aa3a88c 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -434,6 +434,20 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type } #endif +#ifdef EIGEN_HAVE_RVALUE_REFERENCES + PlainObjectBase(PlainObjectBase&& other) + : m_storage( std::move(other.m_storage) ) + { + } + + PlainObjectBase& operator=(PlainObjectBase&& other) + { + using std::swap; + swap(m_storage, other.m_storage); + return *this; + } +#endif + EIGEN_STRONG_INLINE PlainObjectBase(Index a_size, Index nbRows, Index nbCols) : m_storage(a_size, nbRows, nbCols) { |