From 8d7c97d428cdf89c3419a4e13b62a9849feefce9 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 4 Apr 2019 16:46:41 +0200 Subject: Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usage Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 4 ++-- src/corelib/global/qglobalstatic.h | 2 +- src/corelib/global/qrandom.cpp | 4 ++-- src/corelib/global/qtypeinfo.h | 2 +- src/corelib/itemmodels/qitemselectionmodel.cpp | 4 ++-- src/corelib/kernel/qcore_mac_p.h | 2 +- src/corelib/statemachine/qstatemachine_p.h | 4 ++-- src/corelib/tools/qdatetime.cpp | 2 +- src/corelib/tools/qdatetime.h | 2 +- src/corelib/tools/qhash.h | 4 ++-- src/corelib/tools/qhashfunctions.h | 14 ++++++------ src/corelib/tools/qiterator.h | 2 +- src/corelib/tools/qlist.h | 10 ++++----- src/corelib/tools/qpair.h | 30 +++++++++++++------------- src/corelib/tools/qscopedpointer.h | 2 +- src/corelib/tools/qset.h | 2 +- src/corelib/tools/qvarlengtharray.h | 8 +++---- src/corelib/tools/qvector.h | 10 ++++----- 18 files changed, 54 insertions(+), 54 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 223ebbcabe..6f51c25747 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -910,14 +910,14 @@ namespace SwapExceptionTester { // insulate users from the "using std::swap" bel using std::swap; // import std::swap template void checkSwap(T &t) - Q_DECL_NOEXCEPT_EXPR(noexcept(swap(t, t))); + noexcept(noexcept(swap(t, t))); // declared, but not implemented (only to be used in unevaluated contexts (noexcept operator)) } } // namespace QtPrivate template inline void qSwap(T &value1, T &value2) - Q_DECL_NOEXCEPT_EXPR(noexcept(QtPrivate::SwapExceptionTester::checkSwap(value1))) + noexcept(noexcept(QtPrivate::SwapExceptionTester::checkSwap(value1))) { using std::swap; swap(value1, value2); diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h index 93d71cee57..f5c46e9392 100644 --- a/src/corelib/global/qglobalstatic.h +++ b/src/corelib/global/qglobalstatic.h @@ -86,7 +86,7 @@ enum GuardValues { static struct Holder : public HolderBase { \ Type value; \ Holder() \ - Q_DECL_NOEXCEPT_EXPR(noexcept(Type ARGS)) \ + noexcept(noexcept(Type ARGS)) \ : value ARGS \ { guard.store(QtGlobalStatic::Initialized); } \ } holder; \ diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 6195c324e7..6cc46bcf39 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -219,7 +219,7 @@ struct QRandomGenerator::SystemGenerator static SystemGenerator &self(); typedef quint32 result_type; - void generate(quint32 *begin, quint32 *end) Q_DECL_NOEXCEPT_EXPR(FillBufferNoexcept); + void generate(quint32 *begin, quint32 *end) noexcept(FillBufferNoexcept); // For std::mersenne_twister_engine implementations that use something // other than quint32 (unsigned int) to fill their buffers. @@ -354,7 +354,7 @@ static void fallback_fill(quint32 *ptr, qsizetype left) Q_DECL_NOTHROW #endif Q_NEVER_INLINE void QRandomGenerator::SystemGenerator::generate(quint32 *begin, quint32 *end) - Q_DECL_NOEXCEPT_EXPR(FillBufferNoexcept) + noexcept(FillBufferNoexcept) { quint32 *buffer = begin; qsizetype count = end - begin; diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 567ff5c08e..636dc24c07 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -308,7 +308,7 @@ Q_DECLARE_TYPEINFO_BODY(QFlags, Q_PRIMITIVE_TYPE); #define Q_DECLARE_SHARED_IMPL(TYPE, FLAGS) \ Q_DECLARE_TYPEINFO(TYPE, FLAGS); \ inline void swap(TYPE &value1, TYPE &value2) \ - Q_DECL_NOEXCEPT_EXPR(noexcept(value1.swap(value2))) \ + noexcept(noexcept(value1.swap(value2))) \ { value1.swap(value2); } #define Q_DECLARE_SHARED(TYPE) Q_DECLARE_SHARED_IMPL(TYPE, Q_MOVABLE_TYPE) #define Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(TYPE) \ diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp index 1bacb63b17..c93a4d15b9 100644 --- a/src/corelib/itemmodels/qitemselectionmodel.cpp +++ b/src/corelib/itemmodels/qitemselectionmodel.cpp @@ -1273,10 +1273,10 @@ struct IsNotValid { typedef bool result_type; struct is_transparent : std::true_type {}; template - Q_DECL_CONSTEXPR bool operator()(T &t) const Q_DECL_NOEXCEPT_EXPR(noexcept(t.isValid())) + Q_DECL_CONSTEXPR bool operator()(T &t) const noexcept(noexcept(t.isValid())) { return !t.isValid(); } template - Q_DECL_CONSTEXPR bool operator()(T *t) const Q_DECL_NOEXCEPT_EXPR(noexcept(t->isValid())) + Q_DECL_CONSTEXPR bool operator()(T *t) const noexcept(noexcept(t->isValid())) { return !t->isValid(); } }; } diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h index f96e7358a2..920105ee9e 100644 --- a/src/corelib/kernel/qcore_mac_p.h +++ b/src/corelib/kernel/qcore_mac_p.h @@ -90,7 +90,7 @@ public: QAppleRefCounted(const QAppleRefCounted &other) : value(other.value) { if (value) RetainFunction(value); } ~QAppleRefCounted() { if (value) ReleaseFunction(value); } operator T() const { return value; } - void swap(QAppleRefCounted &other) Q_DECL_NOEXCEPT_EXPR(noexcept(qSwap(value, other.value))) + void swap(QAppleRefCounted &other) noexcept(noexcept(qSwap(value, other.value))) { qSwap(value, other.value); } QAppleRefCounted &operator=(const QAppleRefCounted &other) { QAppleRefCounted copy(other); swap(copy); return *this; } diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h index c66130b8ce..93756f0e66 100644 --- a/src/corelib/statemachine/qstatemachine_p.h +++ b/src/corelib/statemachine/qstatemachine_p.h @@ -218,9 +218,9 @@ public: QByteArray prop; // two overloads because friends can't have default arguments friend uint qHash(const RestorableId &key, uint seed) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(std::declval()))) + noexcept(noexcept(qHash(std::declval()))) { return qHash(qMakePair(key.obj, key.prop), seed); } - friend uint qHash(const RestorableId &key) Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(key, 0U))) + friend uint qHash(const RestorableId &key) noexcept(noexcept(qHash(key, 0U))) { return qHash(key, 0U); } friend bool operator==(const RestorableId &lhs, const RestorableId &rhs) Q_DECL_NOTHROW { return lhs.obj == rhs.obj && lhs.prop == rhs.prop; } diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 80d6dada60..fafe7731ce 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -3132,7 +3132,7 @@ inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QT \sa isValid() */ -QDateTime::QDateTime() Q_DECL_NOEXCEPT_EXPR(Data::CanBeSmall) +QDateTime::QDateTime() noexcept(Data::CanBeSmall) { } diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index 43271b34ed..66947881c8 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -258,7 +258,7 @@ class Q_CORE_EXPORT QDateTime }; public: - QDateTime() Q_DECL_NOEXCEPT_EXPR(Data::CanBeSmall); + QDateTime() noexcept(Data::CanBeSmall); explicit QDateTime(const QDate &); QDateTime(const QDate &, const QTime &, Qt::TimeSpec spec = Qt::LocalTime); // ### Qt 6: Merge with above with default offsetSeconds = 0 diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index a586ca5671..7e6506f796 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -1130,7 +1130,7 @@ Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR(Hash) template uint qHash(const QHash &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(std::declval())) && noexcept(qHash(std::declval()))) + noexcept(noexcept(qHash(std::declval())) && noexcept(qHash(std::declval()))) { QtPrivate::QHashCombineCommutative hash; for (auto it = key.begin(), end = key.end(); it != end; ++it) { @@ -1143,7 +1143,7 @@ uint qHash(const QHash &key, uint seed = 0) template inline uint qHash(const QMultiHash &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(std::declval())) && noexcept(qHash(std::declval()))) + noexcept(noexcept(qHash(std::declval())) && noexcept(qHash(std::declval()))) { const QHash &key2 = key; return qHash(key2, seed); diff --git a/src/corelib/tools/qhashfunctions.h b/src/corelib/tools/qhashfunctions.h index d013c26d66..1d30e71053 100644 --- a/src/corelib/tools/qhashfunctions.h +++ b/src/corelib/tools/qhashfunctions.h @@ -114,7 +114,7 @@ template inline uint qHash(const T *key, uint seed = 0) Q_DECL_NOTHROW return qHash(reinterpret_cast(key), seed); } template inline uint qHash(const T &t, uint seed) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t))) + noexcept(noexcept(qHash(t))) { return qHash(t) ^ seed; } namespace QtPrivate { @@ -122,7 +122,7 @@ namespace QtPrivate { struct QHashCombine { typedef uint result_type; template - Q_DECL_CONSTEXPR result_type operator()(uint seed, const T &t) const Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t))) + Q_DECL_CONSTEXPR result_type operator()(uint seed, const T &t) const noexcept(noexcept(qHash(t))) // combiner taken from N3876 / boost::hash_combine { return seed ^ (qHash(t) + 0x9e3779b9 + (seed << 6) + (seed >> 2)) ; } }; @@ -135,7 +135,7 @@ struct QHashCombineCommutative { // QHash). Therefore, provide a commutative combiner, too. typedef uint result_type; template - Q_DECL_CONSTEXPR result_type operator()(uint seed, const T &t) const Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t))) + Q_DECL_CONSTEXPR result_type operator()(uint seed, const T &t) const noexcept(noexcept(qHash(t))) { return seed + qHash(t); } // don't use xor! }; @@ -143,20 +143,20 @@ struct QHashCombineCommutative { template inline uint qHashRange(InputIterator first, InputIterator last, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(*first))) // assume iterator operations don't throw + noexcept(noexcept(qHash(*first))) // assume iterator operations don't throw { return std::accumulate(first, last, seed, QtPrivate::QHashCombine()); } template inline uint qHashRangeCommutative(InputIterator first, InputIterator last, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(*first))) // assume iterator operations don't throw + noexcept(noexcept(qHash(*first))) // assume iterator operations don't throw { return std::accumulate(first, last, seed, QtPrivate::QHashCombineCommutative()); } template inline uint qHash(const QPair &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(key.first, seed)) && noexcept(qHash(key.second, seed))) + noexcept(noexcept(qHash(key.first, seed)) && noexcept(qHash(key.second, seed))) { uint h1 = qHash(key.first, seed); uint h2 = qHash(key.second, seed); @@ -164,7 +164,7 @@ template inline uint qHash(const QPair &key, } template inline uint qHash(const std::pair &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(key.first, seed)) && noexcept(qHash(key.second, seed))) + noexcept(noexcept(qHash(key.first, seed)) && noexcept(qHash(key.second, seed))) { QtPrivate::QHashCombine hash; seed = hash(seed, key.first); diff --git a/src/corelib/tools/qiterator.h b/src/corelib/tools/qiterator.h index 586d26cbad..f659e88b5e 100644 --- a/src/corelib/tools/qiterator.h +++ b/src/corelib/tools/qiterator.h @@ -190,7 +190,7 @@ public: typedef const value_type &reference; QKeyValueIterator() = default; - Q_DECL_CONSTEXPR explicit QKeyValueIterator(Iterator o) Q_DECL_NOEXCEPT_EXPR(std::is_nothrow_move_constructible::value) + Q_DECL_CONSTEXPR explicit QKeyValueIterator(Iterator o) noexcept(std::is_nothrow_move_constructible::value) : i(std::move(o)) {} std::pair operator*() const { diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 34577acaa5..7532997c93 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -1121,14 +1121,14 @@ Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(List) template uint qHash(const QList &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHashRange(key.cbegin(), key.cend(), seed))) + noexcept(noexcept(qHashRange(key.cbegin(), key.cend(), seed))) { return qHashRange(key.cbegin(), key.cend(), seed); } template bool operator<(const QList &lhs, const QList &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(std::lexicographical_compare(lhs.begin(), lhs.end(), + noexcept(noexcept(std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()))) { return std::lexicographical_compare(lhs.begin(), lhs.end(), @@ -1137,21 +1137,21 @@ bool operator<(const QList &lhs, const QList &rhs) template inline bool operator>(const QList &lhs, const QList &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return rhs < lhs; } template inline bool operator<=(const QList &lhs, const QList &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs > rhs); } template inline bool operator>=(const QList &lhs, const QList &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs < rhs); } diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h index 1af43d0a68..6d1e67efb7 100644 --- a/src/corelib/tools/qpair.h +++ b/src/corelib/tools/qpair.h @@ -52,41 +52,41 @@ struct QPair typedef T2 second_type; Q_DECL_CONSTEXPR QPair() - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_default_constructible::value && + noexcept((std::is_nothrow_default_constructible::value && std::is_nothrow_default_constructible::value)) : first(), second() {} Q_DECL_CONSTEXPR QPair(const T1 &t1, const T2 &t2) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_copy_constructible::value && + noexcept((std::is_nothrow_copy_constructible::value && std::is_nothrow_copy_constructible::value)) : first(t1), second(t2) {} // compiler-generated copy/move ctor/assignment operators are fine! template Q_DECL_CONSTEXPR QPair(const QPair &p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_constructible::value && + noexcept((std::is_nothrow_constructible::value && std::is_nothrow_constructible::value)) : first(p.first), second(p.second) {} template Q_DECL_RELAXED_CONSTEXPR QPair &operator=(const QPair &p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_assignable::value && + noexcept((std::is_nothrow_assignable::value && std::is_nothrow_assignable::value)) { first = p.first; second = p.second; return *this; } #ifdef Q_COMPILER_RVALUE_REFS template Q_DECL_CONSTEXPR QPair(QPair &&p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_constructible::value && + noexcept((std::is_nothrow_constructible::value && std::is_nothrow_constructible::value)) // can't use std::move here as it's not constexpr in C++11: : first(static_cast(p.first)), second(static_cast(p.second)) {} template Q_DECL_RELAXED_CONSTEXPR QPair &operator=(QPair &&p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_assignable::value && + noexcept((std::is_nothrow_assignable::value && std::is_nothrow_assignable::value)) { first = std::move(p.first); second = std::move(p.second); return *this; } #endif Q_DECL_RELAXED_CONSTEXPR void swap(QPair &other) - Q_DECL_NOEXCEPT_EXPR(noexcept(qSwap(other.first, other.first)) && noexcept(qSwap(other.second, other.second))) + noexcept(noexcept(qSwap(other.first, other.first)) && noexcept(qSwap(other.second, other.second))) { // use qSwap() to pick up ADL swaps automatically: qSwap(first, other.first); @@ -103,7 +103,7 @@ QPair(T1, T2) -> QPair; #endif template -void swap(QPair &lhs, QPair &rhs) Q_DECL_NOEXCEPT_EXPR(noexcept(lhs.swap(rhs))) +void swap(QPair &lhs, QPair &rhs) noexcept(noexcept(lhs.swap(rhs))) { lhs.swap(rhs); } // mark QPair as complex/movable/primitive depending on the @@ -113,45 +113,45 @@ class QTypeInfo > : public QTypeInfoMerger, T1, T2> template Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator==(const QPair &p1, const QPair &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(p1.first == p2.first && p1.second == p2.second)) + noexcept(noexcept(p1.first == p2.first && p1.second == p2.second)) { return p1.first == p2.first && p1.second == p2.second; } template Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator!=(const QPair &p1, const QPair &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(!(p1 == p2))) + noexcept(noexcept(!(p1 == p2))) { return !(p1 == p2); } template Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator<(const QPair &p1, const QPair &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second))) + noexcept(noexcept(p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second))) { return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second); } template Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator>(const QPair &p1, const QPair &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(p2 < p1)) + noexcept(noexcept(p2 < p1)) { return p2 < p1; } template Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator<=(const QPair &p1, const QPair &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(!(p2 < p1))) + noexcept(noexcept(!(p2 < p1))) { return !(p2 < p1); } template Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator>=(const QPair &p1, const QPair &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(!(p1 < p2))) + noexcept(noexcept(!(p1 < p2))) { return !(p1 < p2); } template Q_DECL_CONSTEXPR Q_OUTOFLINE_TEMPLATE QPair qMakePair(const T1 &x, const T2 &y) - Q_DECL_NOEXCEPT_EXPR(noexcept(QPair(x, y))) + noexcept(noexcept(QPair(x, y))) { return QPair(x, y); } diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h index 2a4083466b..a91043faba 100644 --- a/src/corelib/tools/qscopedpointer.h +++ b/src/corelib/tools/qscopedpointer.h @@ -150,7 +150,7 @@ public: return !d; } - void reset(T *other = nullptr) Q_DECL_NOEXCEPT_EXPR(noexcept(Cleanup::cleanup(std::declval()))) + void reset(T *other = nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval()))) { if (d == other) return; diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h index 6640c8486d..323942e1bf 100644 --- a/src/corelib/tools/qset.h +++ b/src/corelib/tools/qset.h @@ -267,7 +267,7 @@ private: template uint qHash(const QSet &key, uint seed = 0) -Q_DECL_NOEXCEPT_EXPR(noexcept(qHashRangeCommutative(key.begin(), key.end(), seed))) +noexcept(noexcept(qHashRangeCommutative(key.begin(), key.end(), seed))) { return qHashRangeCommutative(key.begin(), key.end(), seed); } diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index 597e7464cb..c03fbb2218 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -570,7 +570,7 @@ bool operator!=(const QVarLengthArray &l, const QVarLengthArray bool operator<(const QVarLengthArray &lhs, const QVarLengthArray &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(std::lexicographical_compare(lhs.begin(), lhs.end(), + noexcept(noexcept(std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()))) { return std::lexicographical_compare(lhs.begin(), lhs.end(), @@ -579,21 +579,21 @@ bool operator<(const QVarLengthArray &lhs, const QVarLengthArray inline bool operator>(const QVarLengthArray &lhs, const QVarLengthArray &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return rhs < lhs; } template inline bool operator<=(const QVarLengthArray &lhs, const QVarLengthArray &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs > rhs); } template inline bool operator>=(const QVarLengthArray &lhs, const QVarLengthArray &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs < rhs); } diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 9762ec1b5b..a51b37d02d 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -1062,14 +1062,14 @@ Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(Vector) template uint qHash(const QVector &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHashRange(key.cbegin(), key.cend(), seed))) + noexcept(noexcept(qHashRange(key.cbegin(), key.cend(), seed))) { return qHashRange(key.cbegin(), key.cend(), seed); } template bool operator<(const QVector &lhs, const QVector &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(std::lexicographical_compare(lhs.begin(), lhs.end(), + noexcept(noexcept(std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()))) { return std::lexicographical_compare(lhs.begin(), lhs.end(), @@ -1078,21 +1078,21 @@ bool operator<(const QVector &lhs, const QVector &rhs) template inline bool operator>(const QVector &lhs, const QVector &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return rhs < lhs; } template inline bool operator<=(const QVector &lhs, const QVector &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs > rhs); } template inline bool operator>=(const QVector &lhs, const QVector &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs < rhs); } -- cgit v1.2.3