std::basic_ios<CharT,Traits>:: swap
From cppreference.net
C++
Input/output library
| I/O manipulators | ||||
| Print functions (C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(C++20)
|
||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
| Synchronized Output | ||||
|
(C++20)
|
||||
| Types | ||||
| Error category interface | ||||
|
(C++11)
|
||||
|
(C++11)
|
std::basic_ios
| Member functions | ||||
| State functions | ||||
| Formatting | ||||
| Miscellaneous | ||||
| Protected member functions | ||||
|
(C++11)
|
||||
|
basic_ios::swap
(C++11)
|
||||
|
(C++11)
|
|
protected
:
void swap ( basic_ios & other ) noexcept ; |
(C++11以降) | |
*
this
と
other
の状態を交換しますが、関連付けられた
rdbuf
オブジェクトは除きます。
rdbuf()
と
other.
rdbuf
(
)
は呼び出し前と同じ値を返します。
このswap関数は保護されています:これは、 std::basic_ofstream や std::basic_istringstream のような派生ストリームクラスのswapメンバ関数によって呼び出されます。これらのクラスは、関連するストリームバッファを正しく交換する方法を知っています。
パラメータ
| other | - |
状態を交換する
basic_ios
オブジェクト
|
関連項目
|
(C++11)
|
他の
std::basic_ios
から
rdbuf
を除いてムーブする
(protected member function) |