命名空间
变体
操作

std::swap(std::basic_stringstream)

来自 cppreference.cn
 
 
输入/输出库
I/O 操纵器
打印函数 (C++23)
C 风格 I/O
缓冲区
(C++98 中弃用,C++26 中移除)
抽象
文件 I/O
字符串 I/O
数组 I/O
(C++98 中弃用,C++26 中移除)
(C++98 中弃用,C++26 中移除)
(C++98 中弃用,C++26 中移除)
同步输出
类型
错误类别接口
(C++11)
 
 
定义于头文件 <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)
交换两个字符串流
(公开成员函数) [编辑]