命名空间
变体
操作

std::basic_ios<CharT,Traits>::move

来自 cppreference.cn
< cpp‎ | io‎ | basic ios
 
 
 
 
protected:
void move( basic_ios& other );
(since C++11)
protected:
void move( basic_ios&& other );
(since C++11)

将当前状态替换为 other 的状态,但关联的 rdbuf 除外。调用后,other 处于有效但未指定的状态。在此函数调用之后,rdbuf() 返回空指针,other.rdbuf() 返回与调用前相同的值,并且 other.tie() 返回空指针。

此成员函数是受保护的:它由派生流类 std::basic_ostreamstd::basic_istream 的受保护移动构造函数调用,而这些构造函数又由更进一步派生的流类(如 std::basic_ofstream)的公共移动构造函数调用,这些类知道如何正确移动关联的流缓冲区。

[编辑] 参数

other - 要从中转移状态的 basic_ios 对象

[编辑] 返回值

(无)

[编辑] 参见

(C++11)
与另一个 std::basic_ios 交换,但 rdbuf 除外
(受保护的成员函数) [编辑]