Next : Transform, Previous : Copy, Top : Table of Contents
swap (T& a, T& b) | Function |
templatevoid swap(T& a, T& b);
swap exchanges values stored in two locations.
iter_swap (ForwardIterator1 a, ForwardIterator2 b) | Function |
templatevoid iter_swap(ForwardIterator1 a, ForwardIterator2 b);
iter_swap exchanges values pointed by the two iterators a and b.
ForwardIterator2 swap_ranges (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2) | Function |
templateFor each non-negative integer n < (last1 - first1) the swap is performed: swap(*(first1 + n), *(first2 + n)). swap_ranges returns first2 + (last1 - first1). Exactly last1 - first1 swaps are done. The result of swap_ranges is undefined if the two ranges [first1, last1) and [first2, first2 + (last1 - first1)) overlap.ForwardIterator2 swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2);
|