Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | io‎ | basic ios
Revision as of 17:35, 10 May 2017 by T. Canens (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
 
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 streambuffers.

[edit] Parameters

other - the basic_ios object to exchange the state with

[edit] Return value

(none)

[edit] See also

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