Namespaces
Variants
Views
Actions

std::swap(std::basic_string)

From cppreference.com
< cpp‎ | string‎ | basic string
Revision as of 09:49, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
std::basic_string
 

Template:ddcl list begin <tr class="t-dcl ">

<td class="t-dcl-nopad">
template< class T, class Alloc >
void swap( basic_string<T,Alloc> &lhs, basic_string<T,Alloc> &rhs );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

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

Contents

Parameters

lhs, rhs - strings whose contents to swap

Return value

(none)

Complexity

Constant.

See also

Template:cpp/string/basic string/dcl list swap