Namespaces
Variants
Views
Actions

std::swap(std::vector)

From cppreference.com
< cpp‎ | container‎ | vector
Revision as of 17:13, 2 November 2012 by P12bot (Talk | contribs)

template< class T, class Alloc >

void swap( vector<T,Alloc>& lhs,

           vector<T,Alloc>& rhs );

Specializes the std::swap algorithm for std::vector. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs).

Contents

Parameters

lhs, rhs - containers whose contents to swap

Return value

(none)

Complexity

Constant.

See also

swaps the contents
(public member function) [edit]