Share via


iter_swap

iter_swap

template<class FwdIt1, class FwdIt2>
    void iter_swap(FwdIt1 x, FwdIt2 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.

See the related sample program.