在线文档教程
C++
输入/输出 | Input/output

std::basic_ios::swap

性病:基本[医]IOS::全部门办法

protected: void swap( basic_ios& other (since C++11)

交换状态*thisother,除了相关的rdbuf物品。rdbuf()other.rdbuf()返回与调用前相同的值。

此交换函数受到保护:它由派生流类的交换成员函数调用,如std::basic_ofstreamstd::basic_istringstream,它们知道如何正确地交换相关的流缓冲区。

参数

other-the basic_ios object to exchange the state with

返回值

%280%29

例外

noexcept规格:

noexcept

另见

move (C++11)moves from another std::basic_ios except for rdbuf (protected member function)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/io/basic[医]IOS/SWAP