swap_ranges

Syntax:

    #include <algorithm>
    forward_iterator2 swap_ranges( forward_iterator start1, forward_iterator end1, forward_iterator2 start2 );

The swap_ranges() function exchanges the elements in the range [start1,end1) with the range of the same size starting at start2.

The return value of swap_ranges() is an iterator to start2 + (end1-start1).

Related Topics: iter_swap, swap