diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h index a9f65254794..33f8c81e68f 100644 --- a/src/corelib/tools/qpair.h +++ b/src/corelib/tools/qpair.h @@ -85,38 +85,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)) { 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))) { 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))) { 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)) { 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))) { 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))) { 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))) { return QPair(x, y); }