std::swap(std::basic_stringstream)

来自cppreference.com
在标头 <sstream> 定义
template< class CharT, class Traits, class Alloc >

void swap( std::basic_stringstream<CharT,Traits,Alloc>& lhs,

           std::basic_stringstream<CharT,Traits,Alloc>& rhs );
(C++11 起)

std::basic_stringstream 重载 std::swap 算法。交换 lhsrhs 的状态。相当于调用 lhs.swap(rhs)

目录

[编辑] 参数

lhs, rhs - 要交换状态的流

[编辑] 返回值

(无)

[编辑] 异常

可能会抛出由实现定义的异常。

[编辑] 示例

[编辑] 参阅

(C++11)
交换两个字符串流
(公开成员函数) [编辑]