swap_ranges [C++ Reference]
Keywords: stl,algorithm,swap_ranges
Date: 2009-10-09T02:23:02-0700

## 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