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 成员函数调用,这些派生流类知道如何正确交换关联的流缓冲区。
[编辑] 参数
其他 | - | 要交换状态的 basic_ios 对象 |
[编辑] 另请参阅
(C++11) |
从另一个 std::basic_ios 移动,但 rdbuf 除外(protected 成员函数) |