std::basic_ospanstream<CharT,Traits>::operator=
From cppreference.com
< cpp | io | basic ospanstream
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Input/output library
Print functions (C++23)
Buffers
(C++23)
(C++98/26*)
(C++20)
Streams
Abstractions
File I/O
String I/O
Array I/O
(C++23)
(C++23)
(C++23)
(C++98/26*)
(C++98/26*)
(C++98/26*)
Synchronized Output
(C++20)
Types
Error category interface
(C++11)
(C++11)
basic_ospanstream& operator=( basic_ospanstream&& other );
(1)
(since C++23)
basic_ospanstream& operator=( const basic_ospanstream& ) = delete;
(2)
(since C++23)
1) Move assigns the other to *this, effectively move-assigning both the std::basic_ostream base class subobject and the wrapped std::basic_spanbuf.
2) Copy assignment operator is deleted.
basic_ospanstream
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.
[edit] Parameters
other
-
another stream to move from
[edit] Return value
*this
[edit] Exceptions
May throw implementation-defined exceptions.
[edit] Example
This section is incomplete
Reason: no example
Reason: no example