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 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/corelib/global') 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) \ -- cgit v1.2.3