| 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) |
| Global objects | ||||
| Member functions | ||||
basic_istream::operator= (C++11) | ||||
| Formatted input | ||||
| Unformatted input | ||||
| Positioning | ||||
| Miscellaneous | ||||
(C++11) | ||||
| Member classes | ||||
| Non-member functions | ||||
protected: basic_istream& operator=(const basic_istream& rhs)= delete; | (1) | |
protected: basic_istream& operator=( basic_istream&& rhs); | (2) | (since C++11) |
gcount() values and all data members of the base class, except forrdbuf(), withrhs, as if by callingswap(*rhs). This move assignment operator is protected: it is only called by the move assignment operators of the derived movable input stream classesstd::basic_ifstream andstd::basic_istringstream, which know how to correctly move-assign the associated streambuffers.| rhs | - | the basic_istream object from which to assign to*this |
#include <iostream>#include <sstream> int main(){std::istringstream s1; s1=std::istringstream("test");// OK // std::cin = std::istringstream("test"); // ERROR: 'operator=' is protected}