Scroll to navigation

std::basic_ispanstream::operator=(3) C++ Standard Libary std::basic_ispanstream::operator=(3)

NAME

std::basic_ispanstream::operator= - std::basic_ispanstream::operator=

Synopsis


basic_ispanstream& operator=( basic_ispanstream&& other ); (1) (since C++23)
basic_ispanstream& operator=( const basic_ispanstream& ) = delete; (2) (since C++23)


1) Move assigns the other to *this, effectively move-assigning both the
std::basic_istream base class subobject and the wrapped std::basic_spanbuf.
2) Copy assignment operator is deleted. basic_ispanstream 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


This section is incomplete
Reason: no example

See also


operator= assigns a basic_spanbuf object
(C++23) (public member function of std::basic_spanbuf<CharT,Traits>)
operator= move-assigns from another basic_istream
(C++11) (protected member function)

Category:


* Todo no example

2024.06.10 http://cppreference.com