std::basic_ios<CharT,Traits>::swap
來自 cppreference.com
protected: void swap( basic_ios& other ) noexcept; |
(C++11 起) | |
交換 *this 和 other 的狀態,但關聯的 rdbuf
物件除外。rdbuf() 和 other.rdbuf() 在呼叫前後返回相同的值。
此 swap 函式受保護:它由派生流類(如 std::basic_ofstream 或 std::basic_istringstream)的 swap 成員函式呼叫,這些派生流類知道如何正確交換關聯的流緩衝區。
[編輯] 引數
其他 | - | 要交換狀態的 basic_ios 物件 |
[編輯] 另請參閱
(C++11) |
從另一個 std::basic_ios 移動,但 rdbuf 除外(protected 成員函式) |