I/O manipulators | ||||
Print functions(C++23) | ||||
C-style I/O | ||||
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) |
Public member functions | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
basic_syncbuf::emit (C++20) | ||||
(C++20) | ||||
(C++20) | ||||
Protected member functions | ||||
(C++20) | ||||
Non-member functions | ||||
(C++20) |
bool emit(); | ||
Atomically transmits all pending output to the wrapped stream.
Allemit() calls transferring characters to the same wrapped stream buffer object appear to execute in a total order, where eachemit() callsynchronizes-with subsequentemit() calls in that total order, even if these calls are made through difference instances ofstd::basic_syncbuf/std::basic_osyncstream. In practice, this means that emit() takes a lock uniquely associated with the wrapped stream object: for example, it could be held in a static hash map where the address of the wrapped stream is used as the key.
If a call had been made tosync since the last call toemit(), then also flushes the wrapped stream by callingpubsync() on it.
Contents |
(none)
true if all of the following is true:
Returnsfalse otherwise.
Normally called by the destructor or move assignment of the owningstd::basic_osyncstream, or bystd::basic_osyncstream::emit.
This section is incomplete Reason: no example |
destroys thebasic_osyncstream and emits its internal buffer(public member function of std::basic_osyncstream<CharT,Traits,Allocator> )[edit] | |
callsemit() on the underlyingbasic_syncbuf to transmit its internal data to the final destination(public member function of std::basic_osyncstream<CharT,Traits,Allocator> )[edit] | |
constructs abasic_syncbuf object(public member function)[edit] |