名前空間
変種
操作

std::basic_syncbuf<CharT,Traits,Allocator>::operator=

From cppreference.com
< cpp‎ | io‎ | basic syncbuf
 
 
 
std::basic_syncbuf
公開メンバ関数
basic_syncbuf::operator=
(C++20)
Protected member functions
非メンバ関数
 
basic_syncbuf& operator=( basic_syncbuf&& other );

まず、保留中のすべての出力(および保留中のフラッシュがあれば)をラップされたストリームに送信するために、emit() を呼び出します。

次に、一時ストレージ、ラップされたストリームポインタ、ポリシー、およびその他のすべての状態(ミューテックスポインタなど)を含む、other からのすべてのコンテンツを移動させることで、ムーブ代入を実行します。移動後、other はストリームに関連付けられず、other.get_wrapped() = nullptr になります。other の基底クラス std::basic_streambuf のプット領域メンバポインタはヌルであることが保証されます。移動元となった other を破棄しても、出力は生成されません。

もし std::allocator_traits<Allocator>::propagate_on_container_move_assignment::valuefalse ならば、アロケータは変更されません。そうでなければ、ムーブ代入後、get_allocator()other.get_allocator() と等しくなります。

目次

[編集] パラメータ

その他 - 移動元の別の std::basic_syncbuf

[編集] 戻り値

*this

[編集]

[編集] 関連項目

basic_osyncstream オブジェクトを代入します。
(std::basic_osyncstream<CharT,Traits,Allocator> の public メンバ関数) [編集]
basic_syncbufオブジェクトを構築する
(public メンバ関数) [編集]
内部バッファ全体をラップされたstreambufにアトミックに送信する
(public メンバ関数) [編集]
2つのbasic_syncbufオブジェクトをスワップする
(public メンバ関数) [編集]
English 日本語 中文(简体) 中文(繁體)