Код: Выделить всё
template
void std::swap(T& a, T& b) {
auto tmp = std::move(a);
a = std::move(b);
b = std::move(tmp);
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... -swap-func
Код: Выделить всё
template
void std::swap(T& a, T& b) {
auto tmp = std::move(a);
a = std::move(b);
b = std::move(tmp);
}