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
;
|
||
Devuelve un puntero al std::basic_streambuf encapsulado, obtenido llamando a get_wrapped() en el std::basic_syncbuf subyacente.
Parámetros
(ninguno)
Ejemplo
El búfer envuelto puede ser envuelto de forma segura nuevamente en un flujo de salida sincronizado diferente.
Ejecutar este código
#include <iostream> #include <syncstream> int main() { std::osyncstream bout1(std::cout); bout1 << "Hello, "; { std::osyncstream(bout1.get_wrapped()) << "Goodbye, " << "Planet!" << '\n'; } // emite el contenido del búfer temporal bout1 << "World!" << '\n'; } // emite el contenido de bout1
Salida:
Goodbye, Planet! Hello, World!
Véase también
destruye el
basic_osyncstream
y emite su buffer interno
(función miembro pública) |
|
|
recupera el puntero al streambuf encapsulado
(función miembro pública de
std::basic_syncbuf<CharT,Traits,Allocator>
)
|