<QtSwap> Proxy Page
Functions
void | qSwap(T &var1, T &var2) |
Function Documentation
[constexpr noexcept(...)]
template <typename T> void qSwap(T &var1, T &var2)
\deprecated
Use std::swap
instead.
Exchanges the values of variables var1 and var2.
Example:
double pi = 3.14; double e = 2.71; qSwap(pi, e); // pi == 2.71, e == 3.14
Note: This function does not throw any exception when "noexcept(QtPrivate::SwapExceptionTester::checkSwap(value1))" is true.