std::basic_...:get_wrapped(3)
πΈ NAME πΈ
Okay so this is the std::basic_osyncstream::get_wrapped page from the C++ Standard Libary manual β manual tag std::basic_...:get_wrapped(3). The name is std::basic_osyncstream::get_wrapped β std::basic_osyncstream::get_wrapped. Itβs giving βhand me the wrapped stream buffer, bestie.β π
π Synopsis
streambuf_type* get_wrapped() const noexcept;
Returns a pointer to the wrapped std::basic_streambuf, obtained by calling get_wrapped() on the underlying std::basic_syncbuf. Slay. β¨
π Parameters
(none) β literally none, bestie. No args, no stress. π«Ά
π Example
Wrapped buffer can be safely wrapped again in a different synchronized output stream. Iconic behavior, honestly. π¦
Run this code, bestie π§:
#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
π Output π
Output:
Goodbye, Planet!
Hello, World!
π See also
destructorβ destroys thebasic_osyncstreamand emits its internal buffer (public member function)- retrieves the wrapped streambuf pointer
get_wrappedβ (public member function ofstd::basic_syncbuf<CharT,Traits,Allocator>)
mwah π β source: http://cppreference.com Β· version/date: 2024.06.10 Β· manual: std::basic_...:get_wrapped(3) β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms