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

std::basic_fstream::swap

性病:基本[医]fstream::swp

void swap( basic_fstream& other (since C++11)

将流的状态与other...

实现的办法是调用basic_iostream<CharT, Traits>::swap(other)和rdbuf()->swap(other.rdbuf())...

参数

other-stream to exchange the state with

返回值

%280%29

另见

operator= (C++11)moves the file stream (public member function)
swap (C++11)swaps two basic_filebuf objects (public member function of std::basic_filebuf)

© cppreference.com

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

http://en.cppreference.com/w/cpp/io/basic[医]fstream/交换