Namespaces
Variants
Views
Actions

std::swap(std::basic_string)

From cppreference.com
< cpp‎ | string‎ | basic string
Revision as of 09:44, 19 March 2012 by P12 (Talk | contribs)

Template:cpp/string/basic string/sidebar 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 Template:cpp algorithm for Template:cpp. Swaps the contents of lhs and rhs. Calls Template:cpp.

Contents

Parameters

lhs, rhs - strings whose contents to swap

Return value

(none)

Complexity

Constant.

See also

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