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 的放置區成員指標為空。銷燬一個被移動後的 other 不會產生任何輸出。
若 std::allocator_traits<Allocator>::propagate_on_container_move_assignment::value 為 false,則分配器保持不變。否則,在移動賦值後,get_allocator() 等於 other.get_allocator()。
目錄 |
[編輯] 引數
其他 | - | 另一個要從中移動的 std::basic_syncbuf |
[編輯] 返回值
*this
[編輯] 示例
本節不完整 原因:無示例 |
[編輯] 參閱
賦值一個 basic_osyncstream 物件( std::basic_osyncstream<CharT,Traits,Allocator> 的公開成員函式) | |
構造 basic_syncbuf 物件(公開成員函式) | |
原子地將整個內部緩衝區傳輸到被包裝的 streambuf (公開成員函式) | |
交換兩個 basic_syncbuf 物件(公開成員函式) |