Name

swap function template — Swaps contents of two vectors

Synopsis

template <typename T, typename Alloc>
void swap(vector<T,Alloc>& x, vector<T,Alloc>& y);
template <typename Alloc>
void swap(vector<bool,Alloc>& x, vector<bool,Alloc>& y);

The swap function template specialization is equivalent to calling x.swap(y).