I'm trying out C++20's concepts, and either std::swappable_with is undefined (Visual Studio, using /std:c++latest) or its constraints are not matched by the MCVE below (g++10 using -std=c++2a) -- that is, int is not swappable with int (!). What's the fix for this? If int can't be swapped with int, I don't see anything working.
#include <concepts>
template <typename T, typename U>
requires std::swappable_with<T,U>
void mySwap(T& t, U& u)
{
T temp = t; t = u; u = temp;
}
int main()
{
int x, y;
mySwap(x, y);
return 0;
}