std::basic_iostream<CharT,Traits>::swap
来自cppreference.com
                    
                                        
                    < cpp | io | basic iostream
                    
                                                            
                    |   protected: void swap( basic_iostream& other );  | 
(C++11 起) | |
与另一输入/输出流交换状态。等效地调用 basic_istream<CharT,Traits>::swap(other) 。
此成员函数受保护:导出流类 std::basic_stringstream 和 std::basic_fstream 的 swap 成员函数知晓如何正确交换关联缓冲区,并调用此函数。
参数
| other | - | 要交换状态的另一流 | 
返回值
*this