std::basic_spanbuf<CharT,Traits>::swap - cppreference.com
Namespaces
Variants

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

From cppreference.com
 
 
 
std::basic_spanbuf
Public member functions
Protected member functions
Non-member functions
 
void swap( basic_spanbuf& rhs );
(since C++23)

Swaps the state of *this and rhs.

Calls std::basic_streambuf<Char, Traits>::swap(rhs), swaps the open mode of *this and rhs, and then makes them use the underlying buffer of each other.

Parameters

rhs - another basic_stringbuf

Return value

(none)

Exceptions

May throw implementation-defined exceptions.

Notes

This function is called automatically when swapping stream objects, it is rarely necessary to call it directly.

Example

See also