std::basic_iostream::operator=
来自cppreference.com
< cpp | io | basic iostream
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
basic_iostream& operator=( const basic_iostream& other ) = delete; |
(1) | |
protected: basic_iostream& operator=( basic_iostream&& other ); |
(2) | (C++11 起) |
分配到另一个流对象.
1)
拷贝赋值是不允许的.....
2)
移动分配给另一个流对象。有效地调用swap(rhs)。这一举动赋值运算符的保护:它被称为派生的流类的举动所赋值运算符的std::basic_stringstreamstd::basic_fstream知道如何正确地移动分配相关的数据流缓冲区的.
原文:
Move assigns another stream object. Effectively calls swap(rhs). This move assignment operator is protected: it is called by the move assignment operators of the derived stream classes std::basic_stringstream and std::basic_fstream which know how to properly move-assign the associated stream buffers.
[编辑] 参数
other | - | 另一个数据流分配状态
|
[编辑] 返回值
*this
[编辑] 另请参阅
构造对象 (公共成员函数) |