Namespaces
Variants

std::basic_osyncstream<CharT,Traits,Allocator>:: get_wrapped

From cppreference.net
streambuf_type * get_wrapped ( ) const noexcept ;

래핑된 std::basic_streambuf 에 대한 포인터를 반환하며, 이는 내부 std::basic_syncbuf 에서 get_wrapped() 를 호출하여 얻습니다.

매개변수

(없음)

예제

래핑된 버퍼는 다른 동기화된 출력 스트림에서 안전하게 다시 래핑될 수 있습니다.

#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 를 파괴하고 내부 버퍼를 출력합니다
(public member function)
래핑된 streambuf 포인터를 검색합니다
( std::basic_syncbuf<CharT,Traits,Allocator> 의 public member function)