Namespaces
Variants

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

From cppreference.net
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 :: value false ,则分配器保持不变。否则,在移动赋值后, get_allocator ( ) 等于 other. get_allocator ( )

目录

参数

其他 - 要移动来源的另一个 std::basic_syncbuf

返回值

* this

示例

参见

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