std::basic_syncbuf<CharT,Traits,Allocator>::operator=
提供: cppreference.com
< cpp | io | basic syncbuf
basic_syncbuf& operator=(basic_syncbuf&& other); | ||
まず、すべての保留中の出力 (および遅延されたフラッシュ、もしあれば) をラップされたストリームに転送するために emit() を呼びます。
その後、一時記憶域、ラップされたストリームのポインタ、ポリシー、および他のすべての状態 (ミューテックスのポインタなど) を含むすべての内容を other
からムーブすることによってムーブ代入を行います。 ムーブの後、 other
はストリームに紐付かなくなり、 other.get_wrapped()==nullptr になります。 other
の基底クラス std::basic_streambuf の put 領域のポインタメンバはヌルになることが保証されます。 ムーブされた other
の破棄はいかなる出力も生成しません。
std::allocator_traits<Allocator>::propagate_on_container_move_assignment::value が false の場合、アロケータは変更されません。 そうでなければ、ムーブ代入の後、 get_allocator() は other.get_allocator() と等しくなります。
目次 |
[編集]引数
other | - | ムーブする別の std::basic_syncbuf |
[編集]戻り値
*this。
[編集]例
This section is incomplete Reason: no example |
[編集]関連項目
basic_osyncstream を代入します ( std::basic_osyncstream<CharT,Traits,Allocator> のパブリックメンバ関数) | |
basic_syncbuf オブジェクトを構築します (パブリックメンバ関数) | |
内部バッファ全体をラップされた streambuf にアトミックに転送します (パブリックメンバ関数) | |
2つの basic_syncbuf オブジェクトを入れ替えます (パブリックメンバ関数) |