std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped (3) - Linux Manuals
std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped: std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped
Command to display std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped
manual in Linux: $ man 3 std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped
NAME
std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped - std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped
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.
Parameters
(none)
Example
wrapped buffer can be safely wrapped again in a different synchronized output stream
// Run this code
#include <syncstream>
#include <iostream>
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:
Goodbye, Planet!
Hello, World!
See also
destroys the basic_osyncstream and emits its internal buffer
destructor (public member function)
retrieves the wrapped streambuf pointer
get_wrapped (public member function of std::basic_syncbuf<CharT,Traits,Allocator>)
Pages related to std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped
- std::basic_osyncstream<CharT,Traits,Allocator>::basic_osyncstream (3) - std::basic_osyncstream<CharT,Traits,Allocator>::basic_osyncstream
- std::basic_osyncstream<CharT,Traits,Allocator>::emit (3) - std::basic_osyncstream<CharT,Traits,Allocator>::emit
- std::basic_osyncstream<CharT,Traits,Allocator>::operator= (3) - std::basic_osyncstream<CharT,Traits,Allocator>::operator=
- std::basic_osyncstream<CharT,Traits,Allocator>::rdbuf (3) - std::basic_osyncstream<CharT,Traits,Allocator>::rdbuf
- std::basic_osyncstream<CharT,Traits,Allocator>::~basic_osyncstream (3) - std::basic_osyncstream<CharT,Traits,Allocator>::~basic_osyncstream
- std::basic_osyncstream (3) - std::basic_osyncstream
- std::basic_ostream (3) - std::basic_ostream
- std::basic_ostream<CharT,Traits>::basic_ostream (3) - std::basic_ostream<CharT,Traits>::basic_ostream
- std::basic_ostream<CharT,Traits>::flush (3) - std::basic_ostream<CharT,Traits>::flush
- std::basic_ostream<CharT,Traits>::operator<< (3) - std::basic_ostream<CharT,Traits>::operator<<
- std::basic_ostream<CharT,Traits>::operator= (3) - std::basic_ostream<CharT,Traits>::operator=
- std::basic_ostream<CharT,Traits>::put (3) - std::basic_ostream<CharT,Traits>::put
- std::basic_ostream<CharT,Traits>::seekp (3) - std::basic_ostream<CharT,Traits>::seekp
- std::basic_ostream<CharT,Traits>::sentry (3) - std::basic_ostream<CharT,Traits>::sentry
- std::basic_ostream<CharT,Traits>::swap (3) - std::basic_ostream<CharT,Traits>::swap
- std::basic_ostream<CharT,Traits>::tellp (3) - std::basic_ostream<CharT,Traits>::tellp
- std::basic_ostream<CharT,Traits>::write (3) - std::basic_ostream<CharT,Traits>::write