Swaps the values contained within the elements addressed by two iterators.
#include <algorithm> typedef list<int>::iterator iterator; iterator it1 = ilist.begin(), it2 = ilist.begin()+4; iter_swap( it1, it2 );