swap

template<class T>
    void swap(T& x, T& y);

The template function leaves the value originally stored in y subsequently stored in x, and the value originally stored in x subsequently stored in y.