make fixed-size objects trivially move assignable

This commit is contained in:
Charles Schlosser
2024-11-04 17:55:27 +00:00
committed by Rasmus Munk Larsen
parent 7fd305ecae
commit bb73be8a2e
7 changed files with 15 additions and 18 deletions

View File

@@ -474,10 +474,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
protected:
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr PlainObjectBase() = default;
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr PlainObjectBase(PlainObjectBase&&) = default;
EIGEN_DEVICE_FUNC constexpr PlainObjectBase& operator=(PlainObjectBase&& other) EIGEN_NOEXCEPT {
m_storage = std::move(other.m_storage);
return *this;
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr PlainObjectBase& operator=(PlainObjectBase&&) = default;
/** Copy constructor */
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr PlainObjectBase(const PlainObjectBase&) = default;