命名空间
变体
操作

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

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

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

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

目录

[edit] 参数

other - 要移动来源的另一个流

[edit] 返回值

*this

[edit] 异常

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

[edit] 示例

[edit] 参见

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