mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix errors in windows builds and tests
This commit is contained in:
@@ -65,7 +65,8 @@ struct plain_array {
|
||||
|
||||
template <typename T, int Size, int MatrixOrArrayOptions>
|
||||
struct plain_array<T, Size, MatrixOrArrayOptions, 0> {
|
||||
T array[Size];
|
||||
// on some 32-bit platforms, stack-allocated arrays are aligned to 4 bytes, not the preferred alignment of T
|
||||
EIGEN_ALIGN_TO_BOUNDARY(alignof(T)) T array[Size];
|
||||
#if defined(EIGEN_NO_DEBUG) || defined(EIGEN_TESTING_PLAINOBJECT_CTOR)
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr plain_array() = default;
|
||||
#else
|
||||
@@ -73,12 +74,6 @@ struct plain_array<T, Size, MatrixOrArrayOptions, 0> {
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename T, int MatrixOrArrayOptions, int Alignment>
|
||||
struct plain_array<T, 0, MatrixOrArrayOptions, Alignment> {
|
||||
T array[1];
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr plain_array() = default;
|
||||
};
|
||||
|
||||
template <typename T, int Size, int Options, int Alignment>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void swap_plain_array(plain_array<T, Size, Options, Alignment>& a,
|
||||
plain_array<T, Size, Options, Alignment>& b,
|
||||
|
||||
Reference in New Issue
Block a user