34 lines
932 B
Markdown
34 lines
932 B
Markdown
[fstream.swap]
|
||
|
||
# 31 Input/output library [[input.output]](./#input.output)
|
||
|
||
## 31.10 File-based streams [[file.streams]](file.streams#fstream.swap)
|
||
|
||
### 31.10.6 Class template basic_fstream [[fstream]](fstream#swap)
|
||
|
||
#### 31.10.6.3 Swap [fstream.swap]
|
||
|
||
[ð](#lib:swap,basic_fstream)
|
||
|
||
`void swap(basic_fstream& rhs);
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L12450)
|
||
|
||
*Effects*: Exchanges the state of *this and rhs by callingbasic_iostream<charT,traits>::swap(rhs) and*sb*.swap(rhs.*sb*)[.](#1.sentence-1)
|
||
|
||
[ð](#lib:swap,basic_fstream_)
|
||
|
||
`template<class charT, class traits>
|
||
void swap(basic_fstream<charT, traits>& x,
|
||
basic_fstream<charT, traits>& y);
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L12466)
|
||
|
||
*Effects*: Equivalent to x.swap(y)[.](#2.sentence-1)
|