From 8b1b9ac75af3b4eab6d9e61fa519940230b13a1e Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 21 Jul 2019 14:28:19 -0700 Subject: [PATCH] Fix build of Eigen 3.3.7 with GCC 9 --- .../main/native/include/Eigen/src/Core/ArrayBase.h | 2 ++ .../main/native/include/Eigen/src/Core/ArrayWrapper.h | 3 +++ .../src/main/native/include/Eigen/src/Core/Block.h | 11 +++++++++++ .../src/main/native/include/Eigen/src/Core/Diagonal.h | 2 ++ wpiutil/src/main/native/include/Eigen/src/Core/Map.h | 2 ++ .../src/main/native/include/Eigen/src/Core/MapBase.h | 4 ++++ .../main/native/include/Eigen/src/Core/MatrixBase.h | 2 ++ .../main/native/include/Eigen/src/Core/Transpose.h | 7 +++++++ .../native/include/Eigen/src/Core/util/XprHelper.h | 6 ++++-- 9 files changed, 37 insertions(+), 2 deletions(-) diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/ArrayBase.h b/wpiutil/src/main/native/include/Eigen/src/Core/ArrayBase.h index 3dbc7084cd..757d24ce9b 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/ArrayBase.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/ArrayBase.h @@ -100,6 +100,8 @@ template class ArrayBase #undef EIGEN_CURRENT_STORAGE_BASE_CLASS #undef EIGEN_DOC_UNARY_ADDONS + constexpr ArrayBase(const ArrayBase&) = default; + /** Special case of the template operator=, in order to prevent the compiler * from generating a default operator= (issue hit with g++ 4.1) */ diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/ArrayWrapper.h b/wpiutil/src/main/native/include/Eigen/src/Core/ArrayWrapper.h index 688aadd626..1eb0de553c 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/ArrayWrapper.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/ArrayWrapper.h @@ -47,6 +47,9 @@ class ArrayWrapper : public ArrayBase > EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ArrayWrapper) typedef typename internal::remove_all::type NestedExpression; + ArrayWrapper() = default; + ArrayWrapper(const ArrayWrapper&) = default; + typedef typename internal::conditional< internal::is_lvalue::value, Scalar, diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/Block.h b/wpiutil/src/main/native/include/Eigen/src/Core/Block.h index 11de45c2ec..8177444182 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/Block.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/Block.h @@ -111,6 +111,9 @@ template class EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block) typedef typename internal::remove_all::type NestedExpression; + + constexpr Block() = default; + constexpr Block(const Block&) = default; /** Column or Row constructor */ @@ -158,6 +161,8 @@ class BlockImpl typedef typename XprType::StorageIndex StorageIndex; public: typedef Impl Base; + constexpr BlockImpl() = default; + constexpr BlockImpl(const BlockImpl&) = default; EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl) EIGEN_DEVICE_FUNC inline BlockImpl(XprType& xpr, Index i) : Impl(xpr,i) {} EIGEN_DEVICE_FUNC inline BlockImpl(XprType& xpr, Index startRow, Index startCol) : Impl(xpr, startRow, startCol) {} @@ -182,6 +187,9 @@ template }; public: + BlockImpl_dense() = default; + BlockImpl_dense(const BlockImpl_dense&) = default; + typedef MapBase Base; EIGEN_DENSE_PUBLIC_INTERFACE(BlockType) EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl_dense) diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/Diagonal.h b/wpiutil/src/main/native/include/Eigen/src/Core/Diagonal.h index afcaf35756..d1a1e90b38 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/Diagonal.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/Diagonal.h @@ -69,6 +69,8 @@ template class Diagonal typedef typename internal::dense_xpr_base::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(Diagonal) + Diagonal(const Diagonal&) = default; + EIGEN_DEVICE_FUNC explicit inline Diagonal(MatrixType& matrix, Index a_index = DiagIndex) : m_matrix(matrix), m_index(a_index) { diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/Map.h b/wpiutil/src/main/native/include/Eigen/src/Core/Map.h index 548bf9a2d5..08a4c52fb7 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/Map.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/Map.h @@ -120,6 +120,8 @@ template class Ma : (this->rows() * innerStride()); } + Map(const Map&) = default; + /** Constructor in the fixed-size case. * * \param dataPtr pointer to the array to map diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/MapBase.h b/wpiutil/src/main/native/include/Eigen/src/Core/MapBase.h index 668922ffcc..8829df3c38 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/MapBase.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/MapBase.h @@ -86,6 +86,8 @@ template class MapBase typedef typename Base::CoeffReturnType CoeffReturnType; + MapBase(const MapBase&) = default; + /** \copydoc DenseBase::rows() */ EIGEN_DEVICE_FUNC inline Index rows() const { return m_rows.value(); } /** \copydoc DenseBase::cols() */ @@ -247,6 +249,8 @@ template class MapBase const Scalar >::type ScalarWithConstIfNotLvalue; + MapBase(const MapBase&) = default; + EIGEN_DEVICE_FUNC inline const Scalar* data() const { return this->m_data; } EIGEN_DEVICE_FUNC diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/MatrixBase.h b/wpiutil/src/main/native/include/Eigen/src/Core/MatrixBase.h index e6c35907c3..4296b92b40 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/MatrixBase.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/MatrixBase.h @@ -132,6 +132,8 @@ template class MatrixBase #undef EIGEN_CURRENT_STORAGE_BASE_CLASS #undef EIGEN_DOC_UNARY_ADDONS + constexpr MatrixBase(const MatrixBase& other) = default; + /** Special case of the template operator=, in order to prevent the compiler * from generating a default operator= (issue hit with g++ 4.1) */ diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/Transpose.h b/wpiutil/src/main/native/include/Eigen/src/Core/Transpose.h index 79b767bcca..b9ecb4927d 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/Transpose.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/Transpose.h @@ -60,6 +60,9 @@ template class Transpose EIGEN_GENERIC_PUBLIC_INTERFACE(Transpose) typedef typename internal::remove_all::type NestedExpression; + constexpr Transpose() = default; + constexpr Transpose(const Transpose&) = default; + EIGEN_DEVICE_FUNC explicit inline Transpose(MatrixType& matrix) : m_matrix(matrix) {} @@ -109,6 +112,8 @@ class TransposeImpl : public internal::generic_xpr_base >::type { public: + constexpr TransposeImpl() = default; + constexpr TransposeImpl(const TransposeImpl&) = default; typedef typename internal::generic_xpr_base >::type Base; }; @@ -117,6 +122,8 @@ template class TransposeImpl { public: + constexpr TransposeImpl() = default; + constexpr TransposeImpl(const TransposeImpl&) = default; typedef typename internal::TransposeImpl_base::type Base; using Base::coeffRef; EIGEN_DENSE_PUBLIC_INTERFACE(Transpose) diff --git a/wpiutil/src/main/native/include/Eigen/src/Core/util/XprHelper.h b/wpiutil/src/main/native/include/Eigen/src/Core/util/XprHelper.h index ba5bd186d2..4d0671553e 100644 --- a/wpiutil/src/main/native/include/Eigen/src/Core/util/XprHelper.h +++ b/wpiutil/src/main/native/include/Eigen/src/Core/util/XprHelper.h @@ -88,8 +88,10 @@ struct promote_scalar_arg_unsupported {}; //classes inheriting no_assignment_operator don't generate a default operator=. class no_assignment_operator { - private: - no_assignment_operator& operator=(const no_assignment_operator&); + public: + constexpr no_assignment_operator() = default; + constexpr no_assignment_operator(const no_assignment_operator&) = default; + no_assignment_operator& operator=(const no_assignment_operator&) = delete; }; /** \internal return the index type with the largest number of bits */