std::basic_ios<CharT,Traits>::swap
来自 cppreference.cn
protected: void swap( basic_ios& other ) noexcept; |
(自 C++11 起) | |
交换 *this 和 other 的状态,除了关联的 rdbuf
对象。 rdbuf() 和 other.rdbuf() 返回与调用前相同的值。
此 swap 函数是受保护的:它由派生流类(如 std::basic_ofstream 或 std::basic_istringstream)的 swap 成员函数调用,这些函数知道如何正确交换关联的流缓冲区。
[编辑] 参数
other | - | 要与之交换状态的 basic_ios 对象 |
[编辑] 参见
(C++11) |
从另一个 std::basic_ios 移动,除了 rdbuf (受保护的成员函数) |