std::basic_osyncstream<CharT,Traits,Allocator>:: get_wrapped
From cppreference.net
<
cpp
|
io
|
basic osyncstream
C++
Input/output library
| 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)
|
std::basic_osyncstream
| Public member functions | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
|
basic_osyncstream::get_wrapped
(C++20)
|
||||
|
(C++20)
|
|
streambuf_type
*
get_wrapped
(
)
const
noexcept
;
|
||
Gibt einen Zeiger auf den eingepackten std::basic_streambuf zurück, erhalten durch Aufruf von get_wrapped() auf dem zugrundeliegenden std::basic_syncbuf .
Parameter
(keine)
Beispiel
Ein umschlossener Puffer kann sicher erneut in einem anderen synchronisierten Ausgabestrom umschlossen werden.
Diesen Code ausführen
#include <iostream> #include <syncstream> int main() { std::osyncstream bout1(std::cout); bout1 << "Hello, "; { std::osyncstream(bout1.get_wrapped()) << "Goodbye, " << "Planet!" << '\n'; } // gibt den Inhalt des temporären Puffers aus bout1 << "World!" << '\n'; } // gibt den Inhalt von bout1 aus
Ausgabe:
Goodbye, Planet! Hello, World!
Siehe auch
zerstört den
basic_osyncstream
und gibt seinen internen Puffer aus
(öffentliche Elementfunktion) |
|
|
ruft den Zeiger auf den eingebetteten Streambuf ab
(öffentliche Elementfunktion von
std::basic_syncbuf<CharT,Traits,Allocator>
)
|