From 619be0deb6928439b8a3a1b26fe984b788efab7a Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 22 Apr 2025 00:58:47 +0000 Subject: [PATCH] Replace instances of EIGEN_NOEXCEPT macros --- Eigen/src/Cholesky/LDLT.h | 4 +- Eigen/src/Cholesky/LLT.h | 6 +- Eigen/src/Core/Array.h | 6 +- Eigen/src/Core/ArrayWrapper.h | 16 ++-- Eigen/src/Core/AssignEvaluator.h | 16 ++-- Eigen/src/Core/Block.h | 23 ++---- Eigen/src/Core/CommaInitializer.h | 8 +- Eigen/src/Core/CoreEvaluators.h | 10 +-- Eigen/src/Core/CwiseBinaryOp.h | 4 +- Eigen/src/Core/CwiseUnaryOp.h | 4 +- Eigen/src/Core/CwiseUnaryView.h | 4 +- Eigen/src/Core/DenseCoeffsBase.h | 14 ++-- Eigen/src/Core/Diagonal.h | 12 +-- Eigen/src/Core/EigenBase.h | 6 +- Eigen/src/Core/ForceAlignedAccess.h | 8 +- Eigen/src/Core/IndexedView.h | 4 +- Eigen/src/Core/Inverse.h | 4 +- Eigen/src/Core/MapBase.h | 4 +- Eigen/src/Core/Matrix.h | 8 +- Eigen/src/Core/NestByValue.h | 4 +- Eigen/src/Core/PlainObjectBase.h | 6 +- Eigen/src/Core/Product.h | 4 +- Eigen/src/Core/ReturnByValue.h | 4 +- Eigen/src/Core/Reverse.h | 4 +- Eigen/src/Core/Select.h | 4 +- Eigen/src/Core/SelfAdjointView.h | 8 +- Eigen/src/Core/Solve.h | 4 +- Eigen/src/Core/SolveTriangular.h | 4 +- Eigen/src/Core/StlIterators.h | 17 ++--- Eigen/src/Core/Transpose.h | 4 +- Eigen/src/Core/Transpositions.h | 6 +- Eigen/src/Core/TriangularMatrix.h | 12 +-- Eigen/src/Core/VectorwiseOp.h | 8 +- Eigen/src/Core/Visitor.h | 6 +- Eigen/src/Core/arch/GPU/Tuple.h | 2 +- Eigen/src/Core/util/Macros.h | 5 -- Eigen/src/Core/util/Memory.h | 76 +++++++++---------- Eigen/src/Core/util/XprHelper.h | 2 +- Eigen/src/Eigenvalues/Tridiagonalization.h | 4 +- Eigen/src/Geometry/Homogeneous.h | 12 +-- Eigen/src/Geometry/Quaternion.h | 6 +- Eigen/src/Geometry/Transform.h | 4 +- Eigen/src/Householder/HouseholderSequence.h | 4 +- .../BasicPreconditioners.h | 4 +- .../IncompleteCholesky.h | 4 +- .../IterativeLinearSolvers/IncompleteLUT.h | 4 +- .../IterativeSolverBase.h | 4 +- .../IterativeLinearSolvers/SolveWithGuess.h | 4 +- Eigen/src/KLUSupport/KLUSupport.h | 4 +- Eigen/src/LU/FullPivLU.h | 4 +- Eigen/src/LU/PartialPivLU.h | 4 +- 51 files changed, 186 insertions(+), 217 deletions(-) diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index f2d479d3c..b1d801d34 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -230,8 +230,8 @@ class LDLT : public SolverBase > { */ const LDLT& adjoint() const { return *this; } - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_matrix.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_matrix.cols(); } /** \brief Reports whether previous computation was successful. * diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h index 5d3e994e5..7fa4fa2a0 100644 --- a/Eigen/src/Cholesky/LLT.h +++ b/Eigen/src/Cholesky/LLT.h @@ -182,10 +182,10 @@ class LLT : public SolverBase > { * This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as: * \code x = decomposition.adjoint().solve(b) \endcode */ - const LLT& adjoint() const EIGEN_NOEXCEPT { return *this; } + const LLT& adjoint() const noexcept { return *this; } - constexpr Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); } - constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } + constexpr Index rows() const noexcept { return m_matrix.rows(); } + constexpr Index cols() const noexcept { return m_matrix.cols(); } template LLT& rankUpdate(const VectorType& vec, const RealScalar& sigma = 1); diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index 44510c039..57f3186b0 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -129,7 +129,7 @@ class Array : public PlainObjectBase::value) { + EIGEN_DEVICE_FUNC Array& operator=(Array&& other) noexcept(std::is_nothrow_move_assignable::value) { Base::operator=(std::move(other)); return *this; } @@ -253,8 +253,8 @@ class Array : public PlainObjectBaseinnerSize(); } + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return 1; } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return this->innerSize(); } #ifdef EIGEN_ARRAY_PLUGIN #include EIGEN_ARRAY_PLUGIN diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h index ecd23e984..c9a194e99 100644 --- a/Eigen/src/Core/ArrayWrapper.h +++ b/Eigen/src/Core/ArrayWrapper.h @@ -56,10 +56,10 @@ class ArrayWrapper : public ArrayBase > { EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE ArrayWrapper(ExpressionType& matrix) : m_expression(matrix) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_expression.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_expression.cols(); } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { return m_expression.outerStride(); } - EIGEN_DEVICE_FUNC constexpr Index innerStride() const EIGEN_NOEXCEPT { return m_expression.innerStride(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_expression.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_expression.cols(); } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return m_expression.outerStride(); } + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return m_expression.innerStride(); } EIGEN_DEVICE_FUNC constexpr ScalarWithConstIfNotLvalue* data() { return m_expression.data(); } EIGEN_DEVICE_FUNC constexpr const Scalar* data() const { return m_expression.data(); } @@ -131,10 +131,10 @@ class MatrixWrapper : public MatrixBase > { EIGEN_DEVICE_FUNC explicit inline MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_expression.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_expression.cols(); } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { return m_expression.outerStride(); } - EIGEN_DEVICE_FUNC constexpr Index innerStride() const EIGEN_NOEXCEPT { return m_expression.innerStride(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_expression.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_expression.cols(); } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return m_expression.outerStride(); } + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return m_expression.innerStride(); } EIGEN_DEVICE_FUNC constexpr ScalarWithConstIfNotLvalue* data() { return m_expression.data(); } EIGEN_DEVICE_FUNC constexpr const Scalar* data() const { return m_expression.data(); } diff --git a/Eigen/src/Core/AssignEvaluator.h b/Eigen/src/Core/AssignEvaluator.h index 60cb769f3..36f0a9d74 100644 --- a/Eigen/src/Core/AssignEvaluator.h +++ b/Eigen/src/Core/AssignEvaluator.h @@ -674,15 +674,15 @@ class generic_dense_assignment_kernel { #endif } - EIGEN_DEVICE_FUNC constexpr Index size() const EIGEN_NOEXCEPT { return m_dstExpr.size(); } - EIGEN_DEVICE_FUNC constexpr Index innerSize() const EIGEN_NOEXCEPT { return m_dstExpr.innerSize(); } - EIGEN_DEVICE_FUNC constexpr Index outerSize() const EIGEN_NOEXCEPT { return m_dstExpr.outerSize(); } - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_dstExpr.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_dstExpr.cols(); } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { return m_dstExpr.outerStride(); } + EIGEN_DEVICE_FUNC constexpr Index size() const noexcept { return m_dstExpr.size(); } + EIGEN_DEVICE_FUNC constexpr Index innerSize() const noexcept { return m_dstExpr.innerSize(); } + EIGEN_DEVICE_FUNC constexpr Index outerSize() const noexcept { return m_dstExpr.outerSize(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_dstExpr.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_dstExpr.cols(); } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return m_dstExpr.outerStride(); } - EIGEN_DEVICE_FUNC DstEvaluatorType& dstEvaluator() EIGEN_NOEXCEPT { return m_dst; } - EIGEN_DEVICE_FUNC const SrcEvaluatorType& srcEvaluator() const EIGEN_NOEXCEPT { return m_src; } + EIGEN_DEVICE_FUNC DstEvaluatorType& dstEvaluator() noexcept { return m_dst; } + EIGEN_DEVICE_FUNC const SrcEvaluatorType& srcEvaluator() const noexcept { return m_src; } /// Assign src(row,col) to dst(row,col) through the assignment functor. EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void assignCoeff(Index row, Index col) { diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 4741bde22..39abff718 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -289,13 +289,9 @@ class BlockImpl_dense : public internal::dense_xpr_base init(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const internal::remove_all_t& nestedExpression() const - EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const internal::remove_all_t& nestedExpression() const noexcept { return m_xpr; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE XprType& nestedExpression() { return m_xpr; } /** \sa MapBase::innerStride() */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index innerStride() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index innerStride() const noexcept { return internal::traits::HasSameStorageOrderAsXprType ? m_xpr.innerStride() : m_xpr.outerStride(); } /** \sa MapBase::outerStride() */ - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index outerStride() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index outerStride() const noexcept { return internal::traits::HasSameStorageOrderAsXprType ? m_xpr.outerStride() : m_xpr.innerStride(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr StorageIndex startRow() const EIGEN_NOEXCEPT { - return m_startRow.value(); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr StorageIndex startRow() const noexcept { return m_startRow.value(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr StorageIndex startCol() const EIGEN_NOEXCEPT { - return m_startCol.value(); - } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr StorageIndex startCol() const noexcept { return m_startCol.value(); } #ifndef __SUNPRO_CC // FIXME sunstudio is not friendly with the above friend... diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h index c6291234b..4b9ed7735 100644 --- a/Eigen/src/Core/CommaInitializer.h +++ b/Eigen/src/Core/CommaInitializer.h @@ -90,13 +90,7 @@ struct CommaInitializer { return *this; } - EIGEN_DEVICE_FUNC inline ~CommaInitializer() -#if defined VERIFY_RAISES_ASSERT && (!defined EIGEN_NO_ASSERTION_CHECKING) && defined EIGEN_EXCEPTIONS - EIGEN_EXCEPTION_SPEC(Eigen::eigen_assert_exception) -#endif - { - finished(); - } + EIGEN_DEVICE_FUNC inline ~CommaInitializer() { finished(); } /** \returns the built matrix once all its coefficients have been set. * Calling finished is 100% optional. Its purpose is to write expressions diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 6e42ba6c8..e3af2d202 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -149,7 +149,7 @@ class plainobjectbase_evaluator_data { #endif eigen_internal_assert(outerStride == OuterStride); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index outerStride() const EIGEN_NOEXCEPT { return OuterStride; } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index outerStride() const noexcept { return OuterStride; } const Scalar* data; }; @@ -1296,10 +1296,10 @@ struct mapbase_evaluator : evaluator_base { } protected: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rowStride() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rowStride() const noexcept { return XprType::IsRowMajor ? m_outerStride.value() : m_innerStride.value(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index colStride() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index colStride() const noexcept { return XprType::IsRowMajor ? m_innerStride.value() : m_outerStride.value(); } @@ -2017,9 +2017,9 @@ class EvalToTemp : public dense_xpr_base>::type { const ArgType& arg() const { return m_arg; } - constexpr Index rows() const EIGEN_NOEXCEPT { return m_arg.rows(); } + constexpr Index rows() const noexcept { return m_arg.rows(); } - constexpr Index cols() const EIGEN_NOEXCEPT { return m_arg.cols(); } + constexpr Index cols() const noexcept { return m_arg.cols(); } private: const ArgType& m_arg; diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index eadd05e73..e2b2da5a6 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -108,12 +108,12 @@ class CwiseBinaryOp : public CwiseBinaryOpImpl>::RowsAtCompileTime == Dynamic ? m_rhs.rows() : m_lhs.rows(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const noexcept { // return the fixed size type if available to enable compile time optimizations return internal::traits>::ColsAtCompileTime == Dynamic ? m_rhs.cols() : m_lhs.cols(); diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index ebb48d28a..94ec1a0fe 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -60,8 +60,8 @@ class CwiseUnaryOp : public CwiseUnaryOpImpl : public DenseCoeffsBase : public DenseCoeffsBase struct first_aligned_impl { - static constexpr Index run(const Derived&) EIGEN_NOEXCEPT { return 0; } + static constexpr Index run(const Derived&) noexcept { return 0; } }; template diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h index 8dd6f95d2..ff8611c60 100644 --- a/Eigen/src/Core/Diagonal.h +++ b/Eigen/src/Core/Diagonal.h @@ -83,11 +83,11 @@ class Diagonal : public internal::dense_xpr_base(m_matrix.rows(), m_matrix.cols() - m_index.value()); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return 1; } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return 1; } - EIGEN_DEVICE_FUNC constexpr Index innerStride() const EIGEN_NOEXCEPT { return m_matrix.outerStride() + 1; } + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return m_matrix.outerStride() + 1; } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { return 0; } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return 0; } typedef std::conditional_t::value, Scalar, const Scalar> ScalarWithConstIfNotLvalue; @@ -132,13 +132,13 @@ class Diagonal : public internal::dense_xpr_base 0 ? m_index.value() : -m_index.value(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rowOffset() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rowOffset() const noexcept { return m_index.value() > 0 ? 0 : -m_index.value(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index colOffset() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index colOffset() const noexcept { return m_index.value() > 0 ? m_index.value() : 0; } // trigger a compile-time error if someone try to call packet diff --git a/Eigen/src/Core/EigenBase.h b/Eigen/src/Core/EigenBase.h index 9fe8d72f0..c9a6e88e2 100644 --- a/Eigen/src/Core/EigenBase.h +++ b/Eigen/src/Core/EigenBase.h @@ -56,12 +56,12 @@ struct EigenBase { EIGEN_DEVICE_FUNC inline const Derived& const_derived() const { return *static_cast(this); } /** \returns the number of rows. \sa cols(), RowsAtCompileTime */ - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return derived().rows(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return derived().rows(); } /** \returns the number of columns. \sa rows(), ColsAtCompileTime*/ - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return derived().cols(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return derived().cols(); } /** \returns the number of coefficients, which is rows()*cols(). * \sa rows(), cols(), SizeAtCompileTime. */ - EIGEN_DEVICE_FUNC constexpr Index size() const EIGEN_NOEXCEPT { return rows() * cols(); } + EIGEN_DEVICE_FUNC constexpr Index size() const noexcept { return rows() * cols(); } /** \internal Don't use it, but do the equivalent: \code dst = *this; \endcode */ template diff --git a/Eigen/src/Core/ForceAlignedAccess.h b/Eigen/src/Core/ForceAlignedAccess.h index 4085b5fcc..55beab35a 100644 --- a/Eigen/src/Core/ForceAlignedAccess.h +++ b/Eigen/src/Core/ForceAlignedAccess.h @@ -41,10 +41,10 @@ class ForceAlignedAccess : public internal::dense_xpr_base return this->nestedExpression().data() + row_offset + col_offset; } - EIGEN_DEVICE_FUNC constexpr Index innerStride() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { if (traits::InnerStrideAtCompileTime != Dynamic) { return traits::InnerStrideAtCompileTime; } return innerIncrement() * this->nestedExpression().innerStride(); } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { if (traits::OuterStrideAtCompileTime != Dynamic) { return traits::OuterStrideAtCompileTime; } diff --git a/Eigen/src/Core/Inverse.h b/Eigen/src/Core/Inverse.h index d64abd957..79fc3ab6a 100644 --- a/Eigen/src/Core/Inverse.h +++ b/Eigen/src/Core/Inverse.h @@ -51,8 +51,8 @@ class Inverse : public InverseImpl:: explicit EIGEN_DEVICE_FUNC Inverse(const XprType& xpr) : m_xpr(xpr) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_xpr.cols(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_xpr.rows(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_xpr.cols(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_xpr.rows(); } EIGEN_DEVICE_FUNC const XprTypeNestedCleaned& nestedExpression() const { return m_xpr; } diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h index e54aa3634..5e3d746bc 100644 --- a/Eigen/src/Core/MapBase.h +++ b/Eigen/src/Core/MapBase.h @@ -84,9 +84,9 @@ class MapBase : public internal::dense_xpr_base::value) { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Matrix& operator=(Matrix&& other) noexcept( + std::is_nothrow_move_assignable::value) { Base::operator=(std::move(other)); return *this; } @@ -393,8 +393,8 @@ class Matrix : public PlainObjectBase EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const EigenBase& other) : Base(other.derived()) {} - EIGEN_DEVICE_FUNC constexpr Index innerStride() const EIGEN_NOEXCEPT { return 1; } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { return this->innerSize(); } + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return 1; } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return this->innerSize(); } /////////// Geometry module /////////// diff --git a/Eigen/src/Core/NestByValue.h b/Eigen/src/Core/NestByValue.h index 6be4b15b7..2ce83a8c5 100644 --- a/Eigen/src/Core/NestByValue.h +++ b/Eigen/src/Core/NestByValue.h @@ -45,8 +45,8 @@ class NestByValue : public internal::dense_xpr_base EIGEN_DEVICE_FUNC explicit inline NestByValue(const ExpressionType& matrix) : m_expression(matrix) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_expression.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_expression.cols(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_expression.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_expression.cols(); } EIGEN_DEVICE_FUNC operator const ExpressionType&() const { return m_expression; } diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index 989f7e065..a78305e25 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -162,8 +162,8 @@ class PlainObjectBase : public internal::dense_xpr_base::type { EIGEN_DEVICE_FUNC Base& base() { return *static_cast(this); } EIGEN_DEVICE_FUNC const Base& base() const { return *static_cast(this); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const EIGEN_NOEXCEPT { return m_storage.rows(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const EIGEN_NOEXCEPT { return m_storage.cols(); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const noexcept { return m_storage.rows(); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const noexcept { return m_storage.cols(); } /** This is an overloaded version of DenseCoeffsBase::coeff(Index,Index) const * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts. @@ -450,7 +450,7 @@ class PlainObjectBase : public internal::dense_xpr_base::type { /** \brief Move constructor */ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr PlainObjectBase(PlainObjectBase&&) = default; /** \brief Move assignment operator */ - EIGEN_DEVICE_FUNC constexpr PlainObjectBase& operator=(PlainObjectBase&& other) EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC constexpr PlainObjectBase& operator=(PlainObjectBase&& other) noexcept { m_storage = std::move(other.m_storage); return *this; } diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index c25b9bd83..e16c7cc96 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -224,8 +224,8 @@ class Product "if you wanted a coeff-wise or a dot product use the respective explicit functions"); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const EIGEN_NOEXCEPT { return m_lhs.rows(); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const noexcept { return m_lhs.rows(); } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const noexcept { return m_rhs.cols(); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const LhsNestedCleaned& lhs() const { return m_lhs; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const RhsNestedCleaned& rhs() const { return m_rhs; } diff --git a/Eigen/src/Core/ReturnByValue.h b/Eigen/src/Core/ReturnByValue.h index 6ce383215..892c193bd 100644 --- a/Eigen/src/Core/ReturnByValue.h +++ b/Eigen/src/Core/ReturnByValue.h @@ -58,8 +58,8 @@ class ReturnByValue : public internal::dense_xpr_base >:: EIGEN_DEVICE_FUNC inline void evalTo(Dest& dst) const { static_cast(this)->evalTo(dst); } - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return static_cast(this)->rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return static_cast(this)->cols(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return static_cast(this)->rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return static_cast(this)->cols(); } #ifndef EIGEN_PARSED_BY_DOXYGEN #define Unusable \ diff --git a/Eigen/src/Core/Reverse.h b/Eigen/src/Core/Reverse.h index 2f1d1f62e..d11ba1670 100644 --- a/Eigen/src/Core/Reverse.h +++ b/Eigen/src/Core/Reverse.h @@ -87,8 +87,8 @@ class Reverse : public internal::dense_xpr_base > EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Reverse) - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_matrix.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_matrix.cols(); } EIGEN_DEVICE_FUNC inline Index innerStride() const { return -m_matrix.innerStride(); } diff --git a/Eigen/src/Core/Select.h b/Eigen/src/Core/Select.h index 59adae74c..0fa5f1e17 100644 --- a/Eigen/src/Core/Select.h +++ b/Eigen/src/Core/Select.h @@ -63,8 +63,8 @@ class Select : public internal::dense_xpr_base EIGEN_DEVICE_FUNC explicit inline SelfAdjointView(MatrixType& matrix) : m_matrix(matrix) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { return m_matrix.outerStride(); } - EIGEN_DEVICE_FUNC constexpr Index innerStride() const EIGEN_NOEXCEPT { return m_matrix.innerStride(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_matrix.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_matrix.cols(); } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return m_matrix.outerStride(); } + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return m_matrix.innerStride(); } /** \sa MatrixBase::coeff() * \warning the coordinates must fit into the referenced triangular part diff --git a/Eigen/src/Core/Solve.h b/Eigen/src/Core/Solve.h index e6bc8421e..aa5141000 100644 --- a/Eigen/src/Core/Solve.h +++ b/Eigen/src/Core/Solve.h @@ -66,8 +66,8 @@ class Solve : public SolveImpl inline void evalTo(Dest& dst) const { diff --git a/Eigen/src/Core/StlIterators.h b/Eigen/src/Core/StlIterators.h index 4576cc043..a24d4c236 100644 --- a/Eigen/src/Core/StlIterators.h +++ b/Eigen/src/Core/StlIterators.h @@ -36,11 +36,11 @@ class indexed_based_stl_iterator_base { typedef Index difference_type; typedef std::random_access_iterator_tag iterator_category; - indexed_based_stl_iterator_base() EIGEN_NO_THROW : mp_xpr(0), m_index(0) {} - indexed_based_stl_iterator_base(XprType& xpr, Index index) EIGEN_NO_THROW : mp_xpr(&xpr), m_index(index) {} + indexed_based_stl_iterator_base() noexcept : mp_xpr(0), m_index(0) {} + indexed_based_stl_iterator_base(XprType& xpr, Index index) noexcept : mp_xpr(&xpr), m_index(index) {} - indexed_based_stl_iterator_base(const non_const_iterator& other) EIGEN_NO_THROW : mp_xpr(other.mp_xpr), - m_index(other.m_index) {} + indexed_based_stl_iterator_base(const non_const_iterator& other) noexcept + : mp_xpr(other.mp_xpr), m_index(other.m_index) {} indexed_based_stl_iterator_base& operator=(const non_const_iterator& other) { mp_xpr = other.mp_xpr; @@ -335,15 +335,14 @@ class pointer_based_stl_iterator { typedef std::conditional_t pointer; typedef std::conditional_t reference; - pointer_based_stl_iterator() EIGEN_NO_THROW : m_ptr(0) {} - pointer_based_stl_iterator(XprType& xpr, Index index) EIGEN_NO_THROW : m_incr(xpr.innerStride()) { + pointer_based_stl_iterator() noexcept : m_ptr(0) {} + pointer_based_stl_iterator(XprType& xpr, Index index) noexcept : m_incr(xpr.innerStride()) { m_ptr = xpr.data() + index * m_incr.value(); } - pointer_based_stl_iterator(const non_const_iterator& other) EIGEN_NO_THROW : m_ptr(other.m_ptr), - m_incr(other.m_incr) {} + pointer_based_stl_iterator(const non_const_iterator& other) noexcept : m_ptr(other.m_ptr), m_incr(other.m_incr) {} - pointer_based_stl_iterator& operator=(const non_const_iterator& other) EIGEN_NO_THROW { + pointer_based_stl_iterator& operator=(const non_const_iterator& other) noexcept { m_ptr = other.m_ptr; m_incr.setValue(other.m_incr); return *this; diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index faa71a14a..0676a252a 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -65,8 +65,8 @@ class Transpose : public TransposeImpl& nestedExpression() const { diff --git a/Eigen/src/Core/Transpositions.h b/Eigen/src/Core/Transpositions.h index 5624080ee..f6dd25844 100644 --- a/Eigen/src/Core/Transpositions.h +++ b/Eigen/src/Core/Transpositions.h @@ -293,9 +293,9 @@ class Transpose > { public: explicit Transpose(const TranspositionType& t) : m_transpositions(t) {} - EIGEN_DEVICE_FUNC constexpr Index size() const EIGEN_NOEXCEPT { return m_transpositions.size(); } - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_transpositions.size(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_transpositions.size(); } + EIGEN_DEVICE_FUNC constexpr Index size() const noexcept { return m_transpositions.size(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_transpositions.size(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_transpositions.size(); } /** \returns the \a matrix with the inverse transpositions applied to the columns. */ diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index 5dcd7af79..27ad78eca 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -58,10 +58,10 @@ class TriangularBase : public EigenBase { eigen_assert(!((int(Mode) & int(UnitDiag)) && (int(Mode) & int(ZeroDiag)))); } - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return derived().rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return derived().cols(); } - EIGEN_DEVICE_FUNC constexpr Index outerStride() const EIGEN_NOEXCEPT { return derived().outerStride(); } - EIGEN_DEVICE_FUNC constexpr Index innerStride() const EIGEN_NOEXCEPT { return derived().innerStride(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return derived().rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return derived().cols(); } + EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return derived().outerStride(); } + EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return derived().innerStride(); } // dummy resize function EIGEN_DEVICE_FUNC void resize(Index rows, Index cols) { @@ -194,9 +194,9 @@ class TriangularView EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TriangularView) /** \copydoc EigenBase::rows() */ - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_matrix.rows(); } /** \copydoc EigenBase::cols() */ - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_matrix.cols(); } /** \returns a const reference to the nested expression */ EIGEN_DEVICE_FUNC const NestedExpression& nestedExpression() const { return m_matrix; } diff --git a/Eigen/src/Core/VectorwiseOp.h b/Eigen/src/Core/VectorwiseOp.h index 3c5c414c3..ac52dc5a7 100644 --- a/Eigen/src/Core/VectorwiseOp.h +++ b/Eigen/src/Core/VectorwiseOp.h @@ -64,12 +64,8 @@ class PartialReduxExpr : public internal::dense_xpr_base> -constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ReturnType tie(Args&... args) EIGEN_NOEXCEPT { +constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ReturnType tie(Args&... args) noexcept { return ReturnType{args...}; } diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index e69547fbb..00d55577d 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -1277,11 +1277,6 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void ignore_unused_variable(cons #define EIGEN_CATCH(X) else #endif -#define EIGEN_NOEXCEPT noexcept -#define EIGEN_NOEXCEPT_IF(x) noexcept(x) -#define EIGEN_NO_THROW noexcept(true) -#define EIGEN_EXCEPTION_SPEC(X) noexcept(false) - // The all function is used to enable a variadic version of eigen_assert which can take a parameter pack as its input. namespace Eigen { namespace internal { diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 0facd2690..89b2fff00 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -833,46 +833,44 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void* eigen_aligned_alloca_helper(void* pt // HIP does not support new/delete on device. #if EIGEN_MAX_ALIGN_BYTES != 0 && !defined(EIGEN_HIP_DEVICE_COMPILE) -#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \ - EIGEN_DEVICE_FUNC void* operator new(std::size_t size, const std::nothrow_t&) EIGEN_NO_THROW { \ - EIGEN_TRY { return Eigen::internal::conditional_aligned_malloc(size); } \ - EIGEN_CATCH(...) { return 0; } \ +#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \ + EIGEN_DEVICE_FUNC void* operator new(std::size_t size, const std::nothrow_t&) noexcept { \ + EIGEN_TRY { return Eigen::internal::conditional_aligned_malloc(size); } \ + EIGEN_CATCH(...) { return 0; } \ } -#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \ - EIGEN_DEVICE_FUNC void* operator new(std::size_t size) { \ - return Eigen::internal::conditional_aligned_malloc(size); \ - } \ - EIGEN_DEVICE_FUNC void* operator new[](std::size_t size) { \ - return Eigen::internal::conditional_aligned_malloc(size); \ - } \ - EIGEN_DEVICE_FUNC void operator delete(void* ptr) EIGEN_NO_THROW { \ - Eigen::internal::conditional_aligned_free(ptr); \ - } \ - EIGEN_DEVICE_FUNC void operator delete[](void* ptr) EIGEN_NO_THROW { \ - Eigen::internal::conditional_aligned_free(ptr); \ - } \ - EIGEN_DEVICE_FUNC void operator delete(void* ptr, std::size_t /* sz */) EIGEN_NO_THROW { \ - Eigen::internal::conditional_aligned_free(ptr); \ - } \ - EIGEN_DEVICE_FUNC void operator delete[](void* ptr, std::size_t /* sz */) EIGEN_NO_THROW { \ - Eigen::internal::conditional_aligned_free(ptr); \ - } \ - /* in-place new and delete. since (at least afaik) there is no actual */ \ - /* memory allocated we can safely let the default implementation handle */ \ - /* this particular case. */ \ - EIGEN_DEVICE_FUNC static void* operator new(std::size_t size, void* ptr) { return ::operator new(size, ptr); } \ - EIGEN_DEVICE_FUNC static void* operator new[](std::size_t size, void* ptr) { return ::operator new[](size, ptr); } \ - EIGEN_DEVICE_FUNC void operator delete(void* memory, void* ptr) EIGEN_NO_THROW { \ - return ::operator delete(memory, ptr); \ - } \ - EIGEN_DEVICE_FUNC void operator delete[](void* memory, void* ptr) EIGEN_NO_THROW { \ - return ::operator delete[](memory, ptr); \ - } \ - /* nothrow-new (returns zero instead of std::bad_alloc) */ \ - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \ - EIGEN_DEVICE_FUNC void operator delete(void* ptr, const std::nothrow_t&) EIGEN_NO_THROW { \ - Eigen::internal::conditional_aligned_free(ptr); \ - } \ +#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \ + EIGEN_DEVICE_FUNC void* operator new(std::size_t size) { \ + return Eigen::internal::conditional_aligned_malloc(size); \ + } \ + EIGEN_DEVICE_FUNC void* operator new[](std::size_t size) { \ + return Eigen::internal::conditional_aligned_malloc(size); \ + } \ + EIGEN_DEVICE_FUNC void operator delete(void* ptr) noexcept { \ + Eigen::internal::conditional_aligned_free(ptr); \ + } \ + EIGEN_DEVICE_FUNC void operator delete[](void* ptr) noexcept { \ + Eigen::internal::conditional_aligned_free(ptr); \ + } \ + EIGEN_DEVICE_FUNC void operator delete(void* ptr, std::size_t /* sz */) noexcept { \ + Eigen::internal::conditional_aligned_free(ptr); \ + } \ + EIGEN_DEVICE_FUNC void operator delete[](void* ptr, std::size_t /* sz */) noexcept { \ + Eigen::internal::conditional_aligned_free(ptr); \ + } \ + /* in-place new and delete. since (at least afaik) there is no actual */ \ + /* memory allocated we can safely let the default implementation handle */ \ + /* this particular case. */ \ + EIGEN_DEVICE_FUNC static void* operator new(std::size_t size, void* ptr) { return ::operator new(size, ptr); } \ + EIGEN_DEVICE_FUNC static void* operator new[](std::size_t size, void* ptr) { return ::operator new[](size, ptr); } \ + EIGEN_DEVICE_FUNC void operator delete(void* memory, void* ptr) noexcept { return ::operator delete(memory, ptr); } \ + EIGEN_DEVICE_FUNC void operator delete[](void* memory, void* ptr) noexcept { \ + return ::operator delete[](memory, ptr); \ + } \ + /* nothrow-new (returns zero instead of std::bad_alloc) */ \ + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \ + EIGEN_DEVICE_FUNC void operator delete(void* ptr, const std::nothrow_t&) noexcept { \ + Eigen::internal::conditional_aligned_free(ptr); \ + } \ typedef void eigen_aligned_operator_new_marker_type; #else #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 3b758f0ef..a0e160eba 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -171,7 +171,7 @@ class variable_if_dynamic { T m_value; public: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value = 0) EIGEN_NO_THROW : m_value(value) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value = 0) noexcept : m_value(value) {} EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const { return m_value; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return m_value; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value) { m_value = value; } diff --git a/Eigen/src/Eigenvalues/Tridiagonalization.h b/Eigen/src/Eigenvalues/Tridiagonalization.h index e0680e41d..4da6d0739 100644 --- a/Eigen/src/Eigenvalues/Tridiagonalization.h +++ b/Eigen/src/Eigenvalues/Tridiagonalization.h @@ -515,8 +515,8 @@ struct TridiagonalizationMatrixTReturnType : public ReturnByValue() = m_matrix.template diagonal<-1>(); } - constexpr Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); } - constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } + constexpr Index rows() const noexcept { return m_matrix.rows(); } + constexpr Index cols() const noexcept { return m_matrix.cols(); } protected: typename MatrixType::Nested m_matrix; diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index b0a755479..795af0d8d 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -69,10 +69,10 @@ class Homogeneous : public MatrixBase >, int EIGEN_DEVICE_FUNC explicit inline Homogeneous(const MatrixType& matrix) : m_matrix(matrix) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_matrix.rows() + (int(Direction) == Vertical ? 1 : 0); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_matrix.cols() + (int(Direction) == Horizontal ? 1 : 0); } @@ -244,8 +244,8 @@ struct homogeneous_left_product_impl, Lhs> EIGEN_DEVICE_FUNC homogeneous_left_product_impl(const Lhs& lhs, const MatrixType& rhs) : m_lhs(take_matrix_for_product::run(lhs)), m_rhs(rhs) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_lhs.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_lhs.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_rhs.cols(); } template EIGEN_DEVICE_FUNC void evalTo(Dest& dst) const { @@ -275,8 +275,8 @@ struct homogeneous_right_product_impl, Rhs> typedef remove_all_t RhsNested; EIGEN_DEVICE_FUNC homogeneous_right_product_impl(const MatrixType& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) {} - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_lhs.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_lhs.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_rhs.cols(); } template EIGEN_DEVICE_FUNC void evalTo(Dest& dst) const { diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index 6a7cab2b5..147e6e3ae 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -346,13 +346,11 @@ class Quaternion : public QuaternionBase > { // We define a copy constructor, which means we don't get an implicit move constructor or assignment operator. /** Default move constructor */ - EIGEN_DEVICE_FUNC inline Quaternion(Quaternion&& other) - EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible::value) + EIGEN_DEVICE_FUNC inline Quaternion(Quaternion&& other) noexcept(std::is_nothrow_move_constructible::value) : m_coeffs(std::move(other.coeffs())) {} /** Default move assignment operator */ - EIGEN_DEVICE_FUNC Quaternion& operator=(Quaternion&& other) - EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable::value) { + EIGEN_DEVICE_FUNC Quaternion& operator=(Quaternion&& other) noexcept(std::is_nothrow_move_assignable::value) { m_coeffs = std::move(other.coeffs()); return *this; } diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index e45417ce5..a5d7b6083 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -353,10 +353,10 @@ class Transform { inline QTransform toQTransform(void) const; #endif - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return int(Mode) == int(Projective) ? m_matrix.cols() : (m_matrix.cols() - 1); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_matrix.cols(); } /** shortcut for m_matrix(row,col); * \sa MatrixBase::operator(Index,Index) const */ diff --git a/Eigen/src/Householder/HouseholderSequence.h b/Eigen/src/Householder/HouseholderSequence.h index 4bf0b7b94..d49c96156 100644 --- a/Eigen/src/Householder/HouseholderSequence.h +++ b/Eigen/src/Householder/HouseholderSequence.h @@ -183,7 +183,7 @@ class HouseholderSequence : public EigenBase DiagonalPreconditioner& analyzePattern(const MatType&) { diff --git a/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h b/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h index e82761767..dd40058ab 100644 --- a/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +++ b/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h @@ -84,10 +84,10 @@ class IncompleteCholesky : public SparseSolverBase { } /** \internal */ - constexpr Index rows() const EIGEN_NOEXCEPT { return matrix().rows(); } + constexpr Index rows() const noexcept { return matrix().rows(); } /** \internal */ - constexpr Index cols() const EIGEN_NOEXCEPT { return matrix().cols(); } + constexpr Index cols() const noexcept { return matrix().cols(); } /** \returns the tolerance threshold used by the stopping criteria. * \sa setTolerance() diff --git a/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h b/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h index c762baa43..271679fee 100644 --- a/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +++ b/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h @@ -50,8 +50,8 @@ class SolveWithGuess : public internal::generic_xpr_base > { if (m_numeric) klu_free_numeric(&m_numeric, &m_common); } - constexpr Index rows() const EIGEN_NOEXCEPT { return mp_matrix.rows(); } - constexpr Index cols() const EIGEN_NOEXCEPT { return mp_matrix.cols(); } + constexpr Index rows() const noexcept { return mp_matrix.rows(); } + constexpr Index cols() const noexcept { return mp_matrix.cols(); } /** \brief Reports whether previous computation was successful. * diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index 275347964..a725a7bbf 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -391,8 +391,8 @@ class FullPivLU : public SolverBase > MatrixType reconstructedMatrix() const; - EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_lu.rows(); } - EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_lu.cols(); } + EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_lu.rows(); } + EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_lu.cols(); } #ifndef EIGEN_PARSED_BY_DOXYGEN template diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 48c4bacf8..f09b90e2e 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -210,8 +210,8 @@ class PartialPivLU : public SolverBase