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

@@ -123,10 +123,7 @@ class Array : public PlainObjectBase<Array<Scalar_, Rows_, Cols_, Options_, MaxR
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Array() = default;
#endif
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Array(Array&&) = default;
EIGEN_DEVICE_FUNC Array& operator=(Array&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value) {
Base::operator=(std::move(other));
return *this;
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Array& operator=(Array&&) = default;
/** \copydoc PlainObjectBase(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const
* ArgTypes&... args)