命名空间
变体
操作

std::swap(std::basic_ostringstream)

来自 cppreference.cn
定义于头文件 <sstream>
template< class CharT, class Traits, class Alloc >

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

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

为 std::basic_ostringstream 重载了 std::swap 算法。交换 lhs 与 rhs 的状态。实际效果等同于调用 lhs.swap(rhs)。

内容

[编辑] 参数

lhs, rhs - 要交换状态的流

[编辑] 返回值

(无)

[编辑] 异常

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

[编辑] 示例

[编辑] 参见

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