File indexing completed on 2026-09-21 09:21:41
0001
0002
0003
0004
0005 #ifndef QTCORE_QSWAP_H
0006 #define QTCORE_QSWAP_H
0007
0008 #include <QtCore/qtconfigmacros.h>
0009
0010 #include <type_traits>
0011 #include <utility>
0012
0013 #if 0
0014 #pragma qt_class(QtSwap)
0015 #pragma qt_sync_stop_processing
0016 #endif
0017
0018 QT_BEGIN_NAMESPACE
0019
0020 template <typename T>
0021 constexpr void qSwap(T &value1, T &value2)
0022 noexcept(std::is_nothrow_swappable_v<T>)
0023 {
0024 using std::swap;
0025 swap(value1, value2);
0026 }
0027
0028
0029 template <typename T>
0030 constexpr inline void qt_ptr_swap(T* &lhs, T* &rhs) noexcept
0031 {
0032 T *tmp = lhs;
0033 lhs = rhs;
0034 rhs = tmp;
0035 }
0036
0037 QT_END_NAMESPACE
0038
0039 #endif