diff options
-rw-r--r-- | src/corelib/global/qglobal.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 <typename T, typename U = T> constexpr T qExchange(T &t, U &&newValue) +noexcept(std::conjunction_v<std::is_nothrow_move_constructible<T>, std::is_nothrow_assignable<T &, U>>) { T old = std::move(t); t = std::forward<U>(newValue); |