29 Input/output library [input.output]

29.10 File-based streams [file.streams]

29.10.3 Class template basic_­ifstream [ifstream]

29.10.3.3 Assignment and swap [ifstream.assign]

void swap(basic_ifstream& rhs);
Effects: Exchanges the state of *this and rhs by calling basic_­istream<charT, traits>​::​swap(rhs) and sb.swap(rhs.sb).
template<class charT, class traits> void swap(basic_ifstream<charT, traits>& x, basic_ifstream<charT, traits>& y);
Effects: Equivalent to: x.swap(y).