命名空间
变体
操作

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

来自 cppreference.cn
basic_ospanstream& operator=( basic_ospanstream&& other );
(1) (C++23 起)
basic_ospanstream& operator=( const basic_ospanstream& ) = delete;
(2) (C++23 起)
1)other 移动赋值给 *this,有效地移动赋值了 std::basic_ostream 基类子对象和包装的 std::basic_spanbuf
2) 拷贝赋值运算符被删除。basic_ospanstream 不可拷贝赋值。

请注意,基类的移动赋值运算符在 *thisother 之间交换所有流状态变量(除了 rdbuf())。

在移动赋值后,other 中包装的 std::basic_spanbuf 是否仍持有底层缓冲区是实现定义的。

目录

[编辑] 参数

其他 - 另一个要从中移动的流

[编辑] 返回值

*this

[编辑] 异常

可能抛出实现定义的异常。

[编辑] 示例

[编辑] 另请参阅

赋值 basic_spanbuf 对象
(std::basic_spanbuf<CharT,Traits> 的公共成员函数) [编辑]
(C++11)
从另一个basic_ostream移动赋值
(受保护成员函数) [编辑]