名前空間
変種
操作

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

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

ラップされたstd::basic_streambufへのポインタを返します。これは、基になるstd::basic_syncbufget_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 メンバ関数) [編集]
English 日本語 中文(简体) 中文(繁體)