diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 6467ba1984..3fabac3888 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1204,6 +1204,7 @@ void qAsConst(const T &&) = delete; // like std::exchange template constexpr T qExchange(T &t, U &&newValue) +noexcept(std::conjunction_v, std::is_nothrow_assignable>) { T old = std::move(t); t = std::forward(newValue);