mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Revert "Make fixed-size Matrix and Array trivially copyable after C++20"
This reverts commit 47eac21072
This commit is contained in:
@@ -21,10 +21,6 @@ struct traits<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> > : tra
|
||||
typedef ArrayXpr XprKind;
|
||||
typedef ArrayBase<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> > XprBase;
|
||||
};
|
||||
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct has_trivially_copyable_storage<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
: has_trivially_copyable_storage<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> > {};
|
||||
}
|
||||
|
||||
/** \class Array
|
||||
@@ -124,12 +120,6 @@ class Array
|
||||
return Base::_set(other);
|
||||
}
|
||||
|
||||
#if EIGEN_COMP_HAS_P0848R3
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE Array& operator=(
|
||||
const Array& other) requires internal::has_trivially_copyable_storage<Array>::value = default;
|
||||
#endif
|
||||
|
||||
/** Default constructor.
|
||||
*
|
||||
* For fixed-size matrices, does nothing.
|
||||
@@ -169,13 +159,6 @@ class Array
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if EIGEN_COMP_HAS_P0848R3
|
||||
EIGEN_DEVICE_FUNC Array(Array&& other) EIGEN_NOEXCEPT
|
||||
requires internal::has_trivially_copyable_storage<Array>::value = default;
|
||||
EIGEN_DEVICE_FUNC Array& operator=(Array&& other) EIGEN_NOEXCEPT
|
||||
requires internal::has_trivially_copyable_storage<Array>::value = default;
|
||||
#endif
|
||||
|
||||
/** \copydoc PlainObjectBase(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)
|
||||
*
|
||||
* Example: \include Array_variadic_ctor_cxx11.cpp
|
||||
@@ -283,12 +266,6 @@ class Array
|
||||
: Base(other)
|
||||
{ }
|
||||
|
||||
#if EIGEN_COMP_HAS_P0848R3
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE Array(const Array& other) requires internal::has_trivially_copyable_storage<Array>::value =
|
||||
default;
|
||||
#endif
|
||||
|
||||
private:
|
||||
struct PrivateType {};
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user