diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.h | 4 | ||||
-rw-r--r-- | src/corelib/global/qglobalstatic.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qrandom.cpp | 4 | ||||
-rw-r--r-- | src/corelib/global/qtypeinfo.h | 2 | ||||
-rw-r--r-- | src/corelib/itemmodels/qitemselectionmodel.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_mac_p.h | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine_p.h | 4 | ||||
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qdatetime.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qhash.h | 4 | ||||
-rw-r--r-- | src/corelib/tools/qhashfunctions.h | 14 | ||||
-rw-r--r-- | src/corelib/tools/qiterator.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qlist.h | 10 | ||||
-rw-r--r-- | src/corelib/tools/qpair.h | 30 | ||||
-rw-r--r-- | src/corelib/tools/qscopedpointer.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qset.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qvarlengtharray.h | 8 | ||||
-rw-r--r-- | src/corelib/tools/qvector.h | 10 |
18 files changed, 54 insertions, 54 deletions
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 <typename T> 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 <typename T> 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<T>, 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 <typename T> - 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 <typename T> - 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<QByteArray>()))) + noexcept(noexcept(qHash(std::declval<QByteArray>()))) { 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 <class Key, class T> uint qHash(const QHash<Key, T> &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(std::declval<Key&>())) && noexcept(qHash(std::declval<T&>()))) + noexcept(noexcept(qHash(std::declval<Key&>())) && noexcept(qHash(std::declval<T&>()))) { QtPrivate::QHashCombineCommutative hash; for (auto it = key.begin(), end = key.end(); it != end; ++it) { @@ -1143,7 +1143,7 @@ uint qHash(const QHash<Key, T> &key, uint seed = 0) template <class Key, class T> inline uint qHash(const QMultiHash<Key, T> &key, uint seed = 0) - Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(std::declval<Key&>())) && noexcept(qHash(std::declval<T&>()))) + noexcept(noexcept(qHash(std::declval<Key&>())) && noexcept(qHash(std::declval<T&>()))) { const QHash<Key, T> &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 <class T> inline uint qHash(const T *key, uint seed = 0) Q_DECL_NOTHROW return qHash(reinterpret_cast<quintptr>(key), seed); } template<typename T> 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 <typename T> - 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 <typename T> - 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 <typename InputIterator> 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 <typename InputIterator> 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 <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &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 <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key, } template <typename T1, typename T2> inline uint qHash(const std::pair<T1, T2> &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<Iterator>::value) + Q_DECL_CONSTEXPR explicit QKeyValueIterator(Iterator o) noexcept(std::is_nothrow_move_constructible<Iterator>::value) : i(std::move(o)) {} std::pair<Key, T> 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 <typename T> uint qHash(const QList<T> &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 <typename T> bool operator<(const QList<T> &lhs, const QList<T> &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<T> &lhs, const QList<T> &rhs) template <typename T> inline bool operator>(const QList<T> &lhs, const QList<T> &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return rhs < lhs; } template <typename T> inline bool operator<=(const QList<T> &lhs, const QList<T> &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs > rhs); } template <typename T> inline bool operator>=(const QList<T> &lhs, const QList<T> &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<T1>::value && + noexcept((std::is_nothrow_default_constructible<T1>::value && std::is_nothrow_default_constructible<T2>::value)) : first(), second() {} Q_DECL_CONSTEXPR QPair(const T1 &t1, const T2 &t2) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_copy_constructible<T1>::value && + noexcept((std::is_nothrow_copy_constructible<T1>::value && std::is_nothrow_copy_constructible<T2>::value)) : first(t1), second(t2) {} // compiler-generated copy/move ctor/assignment operators are fine! template <typename TT1, typename TT2> Q_DECL_CONSTEXPR QPair(const QPair<TT1, TT2> &p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_constructible<T1, TT1&>::value && + noexcept((std::is_nothrow_constructible<T1, TT1&>::value && std::is_nothrow_constructible<T2, TT2&>::value)) : first(p.first), second(p.second) {} template <typename TT1, typename TT2> Q_DECL_RELAXED_CONSTEXPR QPair &operator=(const QPair<TT1, TT2> &p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_assignable<T1, TT1&>::value && + noexcept((std::is_nothrow_assignable<T1, TT1&>::value && std::is_nothrow_assignable<T2, TT2&>::value)) { first = p.first; second = p.second; return *this; } #ifdef Q_COMPILER_RVALUE_REFS template <typename TT1, typename TT2> Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_constructible<T1, TT1>::value && + noexcept((std::is_nothrow_constructible<T1, TT1>::value && std::is_nothrow_constructible<T2, TT2>::value)) // can't use std::move here as it's not constexpr in C++11: : first(static_cast<TT1 &&>(p.first)), second(static_cast<TT2 &&>(p.second)) {} template <typename TT1, typename TT2> Q_DECL_RELAXED_CONSTEXPR QPair &operator=(QPair<TT1, TT2> &&p) - Q_DECL_NOEXCEPT_EXPR((std::is_nothrow_assignable<T1, TT1>::value && + noexcept((std::is_nothrow_assignable<T1, TT1>::value && std::is_nothrow_assignable<T2, TT2>::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<T1, T2>; #endif template <typename T1, typename T2> -void swap(QPair<T1, T2> &lhs, QPair<T1, T2> &rhs) Q_DECL_NOEXCEPT_EXPR(noexcept(lhs.swap(rhs))) +void swap(QPair<T1, T2> &lhs, QPair<T1, T2> &rhs) noexcept(noexcept(lhs.swap(rhs))) { lhs.swap(rhs); } // mark QPair<T1,T2> as complex/movable/primitive depending on the @@ -113,45 +113,45 @@ class QTypeInfo<QPair<T1, T2> > : public QTypeInfoMerger<QPair<T1, T2>, T1, T2> template <class T1, class T2> Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator==(const QPair<T1, T2> &p1, const QPair<T1, T2> &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 <class T1, class T2> Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator!=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(!(p1 == p2))) + noexcept(noexcept(!(p1 == p2))) { return !(p1 == p2); } template <class T1, class T2> Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator<(const QPair<T1, T2> &p1, const QPair<T1, T2> &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 <class T1, class T2> Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator>(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(p2 < p1)) + noexcept(noexcept(p2 < p1)) { return p2 < p1; } template <class T1, class T2> Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator<=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(!(p2 < p1))) + noexcept(noexcept(!(p2 < p1))) { return !(p2 < p1); } template <class T1, class T2> Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator>=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2) - Q_DECL_NOEXCEPT_EXPR(noexcept(!(p1 < p2))) + noexcept(noexcept(!(p1 < p2))) { return !(p1 < p2); } template <class T1, class T2> Q_DECL_CONSTEXPR Q_OUTOFLINE_TEMPLATE QPair<T1, T2> qMakePair(const T1 &x, const T2 &y) - Q_DECL_NOEXCEPT_EXPR(noexcept(QPair<T1, T2>(x, y))) + noexcept(noexcept(QPair<T1, T2>(x, y))) { return QPair<T1, T2>(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<T *>()))) + void reset(T *other = nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval<T *>()))) { 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 <typename T> uint qHash(const QSet<T> &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<T, Prealloc1> &l, const QVarLengthArray<T, template <typename T, int Prealloc1, int Prealloc2> bool operator<(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &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<T, Prealloc1> &lhs, const QVarLengthArray<T template <typename T, int Prealloc1, int Prealloc2> inline bool operator>(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return rhs < lhs; } template <typename T, int Prealloc1, int Prealloc2> inline bool operator<=(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs > rhs); } template <typename T, int Prealloc1, int Prealloc2> inline bool operator>=(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengthArray<T, Prealloc2> &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 <typename T> uint qHash(const QVector<T> &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 <typename T> bool operator<(const QVector<T> &lhs, const QVector<T> &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<T> &lhs, const QVector<T> &rhs) template <typename T> inline bool operator>(const QVector<T> &lhs, const QVector<T> &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return rhs < lhs; } template <typename T> inline bool operator<=(const QVector<T> &lhs, const QVector<T> &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs > rhs); } template <typename T> inline bool operator>=(const QVector<T> &lhs, const QVector<T> &rhs) - Q_DECL_NOEXCEPT_EXPR(noexcept(lhs < rhs)) + noexcept(noexcept(lhs < rhs)) { return !(lhs < rhs); } |