std::basic_spanstream<CharT,Traits>::operator=

From cppreference.com
< cpp‎ | io‎ | basic spanstream

 
 
Input/output library
I/O manipulators
Print functions (哋它亢++23)
C-style I/O
Buffers
(哋它亢++23)
(哋它亢++98/26*)
(哋它亢++20)
Streams
Abstractions
File I/O
String I/O
Array I/O
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)
(哋它亢++98/26*)
(哋它亢++98/26*)
(哋它亢++98/26*)
Synchronized Output
(哋它亢++20)
Types
Error category interface
(哋它亢++11)
(哋它亢++11)
 
std::basic_spanstream
Member functions
basic_spanstream::operator=
(哋它亢++23)
(哋它亢++23)
Underlying buffer operations
(哋它亢++23)
Non-member functions
 
basic_spanstream& operator=( basic_spanstream&& other );
(1) (since 哋它亢++23)
basic_spanstream& operator=( const basic_spanstream& ) = delete;
(2) (since 哋它亢++23)
1) Move assigns the other to *this, effectively move-assigning both the std::basic_iostream base class subobject and the wrapped std::basic_spanbuf.
2) Copy assignment operator is deleted. basic_spanstream is not copy assignable.

Note that move assignment operator of the base class swaps all stream state variables (except for rdbuf()) between *this and other.

It is implementation-defined whether the std::basic_spanbuf wrapped in other still holds an underlying buffer after the move assignment.

Parameters

other - another stream to move from

Return value

*this

Exceptions

May throw implementation-defined exceptions.

Example

See also

(哋它亢++23)
assigns a basic_spanbuf object
(public member function of std::basic_spanbuf<CharT,Traits>)
(哋它亢++11)
move-assigns another basic_iostream
(protected member function)