Namespaces
Variants

std:: swap (std::basic_ostringstream)

From cppreference.net

定义于头文件 <sstream>
template < class CharT, class Traits, class Alloc >

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

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

std:: basic_ostringstream 重载 std::swap 算法。将 lhs 的状态与 rhs 的状态进行交换。实际调用 lhs. swap ( rhs )

目录

参数

lhs, rhs - 需交换状态的流

返回值

(无)

异常

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

示例

参见

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