命名空间
变体
操作

std::basic_syncbuf<CharT,Traits,Allocator>::operator=

来自 cppreference.cn
< cpp‎ | io‎ | basic syncbuf
 
 
 
 
basic_syncbuf& operator=( basic_syncbuf&& other );

首先,调用 emit() 以将所有待处理的输出(以及任何延迟的刷新)传输到包装的流。

然后通过从 other 移动所有内容(包括临时存储、包装的流指针、策略和所有其他状态(例如互斥锁指针))来执行移动赋值。移动后,other 不再与流关联,并且 other.get_wrapped() == nullptr。基类 std::basic_streambufother 的 put area 成员指针保证为空。销毁一个已移动来源的 other 不会产生任何输出。

如果 std::allocator_traits<Allocator>::propagate_on_container_move_assignment::valuefalse,则分配器保持不变。否则,在移动赋值后,get_allocator() 等于 other.get_allocator()

目录

[编辑] 参数

other - 要从中移动的另一个 std::basic_syncbuf

[编辑] 返回值

*this

[编辑] 示例

[编辑] 参见

赋值一个 basic_osyncstream 对象
(std::basic_osyncstream<CharT,Traits,Allocator> 的公共成员函数) [编辑]
构造一个 basic_syncbuf 对象
(公共成员函数) [编辑]
原子性地将整个内部缓冲区传输到包装的 streambuf
(公共成员函数) [编辑]
交换两个 basic_syncbuf 对象
(公共成员函数) [编辑]