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
는 제외
(보호된 멤버 함수) |