Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
Algorithm
Exchange values.
#include <algorithm>
template <class T> void swap (T& a, T& b);
The swap algorithm exchanges the values of a and b. The effect is:
T tmp = a a = b b = tmp