Namespaces
Variants
Actions

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

From cppreference.com
< cpp‎ | io‎ | basic iostream
 
C++
 
Input/output library
 
std::basic_iostream
Member functions
Protected member functions
basic_iostream::swap
 
protected:
void swap( basic_iostream& other );
(since C++11)

Exchanges the state with another input/output stream object. Effectively calls basic_istream<CharT,Traits>::swap(other).

This member function is protected: it is called by the swap member functions of the derived stream classes std::basic_stringstream and std::basic_fstream, which know how to correctly swap the associated stream buffers.


[edit] Parameters

other - another stream to exchange the state with

[edit] Return value

*this

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