33 lines
931 B
Markdown
33 lines
931 B
Markdown
[ofstream.swap]
|
||
|
||
# 31 Input/output library [[input.output]](./#input.output)
|
||
|
||
## 31.10 File-based streams [[file.streams]](file.streams#ofstream.swap)
|
||
|
||
### 31.10.5 Class template basic_ofstream [[ofstream]](ofstream#swap)
|
||
|
||
#### 31.10.5.3 Swap [ofstream.swap]
|
||
|
||
[ð](#lib:swap,basic_ofstream)
|
||
|
||
`void swap(basic_ofstream& rhs);
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L12180)
|
||
|
||
*Effects*: Exchanges the state of *this and rhs by callingbasic_ostream<charT, traits>::swap(rhs) and*sb*.swap(rhs.*sb*)[.](#1.sentence-1)
|
||
|
||
[ð](#lib:swap,basic_ofstream_)
|
||
|
||
`template<class charT, class traits>
|
||
void swap(basic_ofstream<charT, traits>& x, basic_ofstream<charT, traits>& y);
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L12195)
|
||
|
||
*Effects*: Equivalent to x.swap(y)[.](#2.sentence-1)
|