31 Input/output library [input.output]

31.10 File-based streams [file.streams]

31.10.6 Class template basic_fstream [fstream]

31.10.6.3 Swap [fstream.swap]

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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant