Namespaces
Variants

std::basic_ios<CharT,Traits>:: swap

From cppreference.net
protected :
void swap ( basic_ios & other ) noexcept ;
(自 C++11 起)

交换 * this other 的状态,但不包括关联的 rdbuf 对象。 rdbuf() other. rdbuf ( ) 返回的值与调用前相同。

此 swap 函数受保护:它由派生流类(如 std::basic_ofstream std::basic_istringstream )的 swap 成员函数调用,这些派生类知道如何正确交换关联的流缓冲区。

参数

其他 - 用于交换状态的 basic_ios 对象

参见

(C++11)
从另一个 std::basic_ios 移动(除 rdbuf 外)
(受保护成员函数)