命名空间
变体
操作

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。保证 other 的基类 std::basic_streambuf 的放置区成员指针为空。销毁一个被移动后的 other 不会产生任何输出。

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

目录

[编辑] 参数

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

[编辑] 返回值

*this

[编辑] 示例

[编辑] 参阅

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