std::basic_syncbuf<CharT,Traits,Allocator>::operator=
From cppreference.com
< cpp | io | basic syncbuf
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)
std::basic_syncbuf
Public member functions
(C++20)
basic_syncbuf::operator=
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Protected member functions
(C++20)
Non-member functions
(C++20)
basic_syncbuf& operator=( basic_syncbuf&& other );
First, calls emit() to transmit all pending output (and delayed flush, if any) to the wrapped stream.
Then performs move-assignment by moving all contents from other, including the temporary storage, the wrapped stream pointer, policy, and all other state (such as the mutex pointer). After move, other is not associated with a stream, and other.get_wrapped() == nullptr. The put area member pointers of the base class std::basic_streambuf of other are guaranteed to be null. Destroying a moved-from other will not produce any output.
If std::allocator_traits <Allocator>::propagate_on_container_move_assignment::value is false, then the allocator is unchanged. Otherwise, after move-assignment, get_allocator() equals other.get_allocator().
Contents
[edit] Parameters
other
-
another std::basic_syncbuf to move from
[edit] Return value
*this
[edit] Example
This section is incomplete
Reason: no example
Reason: no example
[edit] See also
assigns a
(public member function of
basic_osyncstream
object (public member function of
std::basic_osyncstream<CharT,Traits,Allocator>
) [edit]
atomically transmits the entire internal buffer to the wrapped streambuf
(public member function) [edit]
(public member function) [edit]