Namespaces
Variants
Actions

std::basic_ios<CharT,Traits>::swap

From cppreference.com
< cpp‎ | io‎ | basic ios
 
C++
 
Input/output library
 
std::basic_ios
protected:
void swap( basic_ios& other ) noexcept;
(since C++11)

Exchanges the states of *this and other, except for the associated rdbuf objects. rdbuf() and other.rdbuf() returns the same values as before the call.

This swap function is protected: it is called by the swap member functions of the derived stream classes such as std::basic_ofstream or std::basic_istringstream, which know how to correctly swap the associated stream buffers.

[edit] Parameters

other - the basic_ios object to exchange the state with

[edit] See also

(C++11)
moves from another std::basic_ios except for rdbuf
(protected member function) [edit]

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