summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-07 08:52:26 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-08 15:12:28 +0200
commit9c1a00271bccd8cefa1a7e568e21debc429ad73a (patch)
tree17f2195f1dac9463cf5b367c79c2da100e3d94a2 /src/corelib/global
parent8cb4ada2a4aaa80cae411da6df9d07e8e7150a51 (diff)
[docs] Adjust qExchange() docs for the present, where C++17 is required [2/2]: 6.3+
In C++17, std::exchange() is unconditionally available, so focus attention on the missing constexpr and noexcept. Pick-to: 6.4 6.3 Change-Id: I5eb466b784bd741a7313a1554d8b7b67711d2cbc Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qttypetraits.qdoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qttypetraits.qdoc b/src/corelib/global/qttypetraits.qdoc
index ab25e30cbf..082b6255a1 100644
--- a/src/corelib/global/qttypetraits.qdoc
+++ b/src/corelib/global/qttypetraits.qdoc
@@ -64,9 +64,9 @@
Replaces the value of \a obj with \a newValue and returns the old value of \a obj.
This is Qt's implementation of std::exchange(). It differs from std::exchange()
- only in that it is \c constexpr already before C++20.
+ only in that it is \c constexpr already before C++20 and noexcept already before C++23.
- We strongly advise to use std::exchange() when you don't need the C++20 variant.
+ We strongly advise to use std::exchange() when you don't need the C++20 or C++23 variants.
Here is how to use qExchange() to implement move constructors:
\code