So I was reading "The C++ Programming Language" and this code got shown. How does it exactly work? I tried asking elsewhere, watching a video on references and another one on basic move semantics but I'm still insanely confused.
template<typename T>
void swap(T& a, T& b)
{
T tmp {static_cast<T&&>(a)};
a = static_cast<T&&>(b);
b = static_cast<T&&>(tmp);
}