Namespaces
Variants

std::basic_ifstream<CharT,Traits>:: operator=

From cppreference.net

basic_ifstream & operator = ( basic_ifstream && other ) ;
(自 C++11 起)

将文件流 other 移动赋值给 * this ,实际上同时移动赋值了 std::basic_istream 基类和关联的 std::basic_filebuf

other 将不再关联任何文件。需要注意的是,基类的移动赋值操作会交换 * this other 之间所有的流状态变量(除 rdbuf 外)。

目录

参数

其他 - 待移动的文件流

返回值

* this

示例

另请参阅

(C++11)
交换两个文件流
(公开成员函数)
(C++11)
赋值 basic_filebuf 对象
( std::basic_filebuf<CharT,Traits> 的公开成员函数)
(C++11)
从另一个 basic_istream 移动赋值
(受保护成员函数)