std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped
streambuf_type* get_wrapped() const noexcept; |
Возвращает указатель на обернутый std::basic_streambuf, полученный вызовом get_wrapped() для базового std::basic_syncbuf.
Параметры
(нет)
Пример
Обёрнутый буфер можно безопасно обернуть в другой синхронизированный поток вывода.
#include <iostream>
#include <syncstream>
int main()
{
std::osyncstream bout1(std::cout);
bout1 << "Hello, ";
{
std::osyncstream(bout1.get_wrapped()) << "Goodbye, " << "Planet!" << '\n';
} // emits the contents of the temporary buffer
bout1 << "World!" << '\n';
} // emits the contents of bout1Вывод:
Goodbye, Planet! Hello, World!
См. также
уничтожает basic_osyncstream и выводит его внутренний буфер (публичный член-функция) |
|
| извлекает указатель на обернутый streambuf (публичный член-функция std::basic_syncbuf<CharT,Traits,Allocator>) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/io/basic_osyncstream/get_wrapped