Files
2025-10-25 03:02:53 +03:00

33 lines
931 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[ifstream.swap]
# 31 Input/output library [[input.output]](./#input.output)
## 31.10 File-based streams [[file.streams]](file.streams#ifstream.swap)
### 31.10.4 Class template basic_ifstream [[ifstream]](ifstream#swap)
#### 31.10.4.3 Swap [ifstream.swap]
[🔗](#lib:swap,basic_ifstream)
`void swap(basic_ifstream& rhs);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L11921)
*Effects*: Exchanges the state of *this and rhs by callingbasic_istream<charT, traits>::swap(rhs) and*sb*.swap(rhs.*sb*)[.](#1.sentence-1)
[🔗](#lib:swap,basic_ifstream_)
`template<class charT, class traits>
void swap(basic_ifstream<charT, traits>& x, basic_ifstream<charT, traits>& y);
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L11936)
*Effects*: Equivalent to x.swap(y)[.](#2.sentence-1)