From bb51f0d81437c1471069e8758cefcc090377aa51 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 20 Sep 2023 21:31:50 +0200 Subject: [PATCH] qSwap: try without -Wno-noexcept The warning from the comment was probably caused by our noexcept detection code. Now that we use std::is_nothrow_swappable, those warnings should not longer happen. Remove the warning suppression macros, and the #include that was necessary for them. Change-Id: Ib750cb1af4a8da3fb63b16d26ec51a9fb4a93ea1 Reviewed-by: Fabian Kosmale Reviewed-by: Ahmad Samir --- src/corelib/global/qswap.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/corelib/global/qswap.h b/src/corelib/global/qswap.h index 8ea0d3a16f..3d533c8a95 100644 --- a/src/corelib/global/qswap.h +++ b/src/corelib/global/qswap.h @@ -5,7 +5,6 @@ #define QTCORE_QSWAP_H #include -#include #include #include @@ -17,10 +16,6 @@ QT_BEGIN_NAMESPACE -QT_WARNING_PUSH -// warning: noexcept-expression evaluates to 'false' because of a call to 'void swap(..., ...)' -QT_WARNING_DISABLE_GCC("-Wnoexcept") - template constexpr void qSwap(T &value1, T &value2) noexcept(std::is_nothrow_swappable_v) @@ -38,8 +33,6 @@ constexpr inline void qt_ptr_swap(T* &lhs, T* &rhs) noexcept rhs = tmp; } -QT_WARNING_POP - QT_END_NAMESPACE #endif // QTCORE_QSWAP_H