std::basic_syncbuf<CharT,Traits,Allocator>::operator= - cppreference.com
提供: cppreference.com
<tbody> </tbody>
|
|
||
まず、すべての保留中の出力 (および遅延されたフラッシュ、もしあれば) をラップされたストリームに転送するために 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。
例
関連項目
| basic_osyncstream を代入します ( std::basic_osyncstream<CharT,Traits,Allocator>のパブリックメンバ関数) [edit]
| |
| basic_syncbuf オブジェクトを構築します (パブリックメンバ関数) [edit] | |
| 内部バッファ全体をラップされた streambuf にアトミックに転送します (パブリックメンバ関数) [edit] | |
| 2つの basic_syncbuf オブジェクトを入れ替えます (パブリックメンバ関数) [edit] |