std::basic_ospanstream<CharT,Traits>::basic_ospanstream
来自cppreference.com
< cpp | io | basic ospanstream
explicit
basic_ospanstream(
std::span<CharT>
s, std::ios_base::openmode
mode =
std::ios_base::out ); |
(1) | (C++23 起) |
basic_ospanstream(
basic_ospanstream&&
rhs );
|
(2) | (C++23 起) |
basic_ospanstream(
const
basic_ospanstream&
) =
delete;
|
(3) | (C++23 起) |
构造新的 basic_ospanstream
。
1) 以
s
所引用的存储为包装的
std::basic_spanbuf 设备的初始底层缓冲区。以 basic_spanbuf<Char, Traits>(s, mode | std::ios_base::out) 构造包装的 std::basic_spanbuf 对象。2) 移动构造函数。从
rhs
的
std::basic_ostream
基类子对象和包装的 std::basic_spanbuf 移动构造对应的子对象,然后以
*this 中包装的
std::basic_spanbuf 的地址调用 set_rdbuf
以安装它。3) 复制构造函数被删除。
basic_ospanstream
不可复制。参数
s | - | 引用要作为流的初始底层缓冲区的存储的 std::span | ||||||||||||||||
mode | - | 指定打开模式。可以用下列常量或它们之间的逐位或:
|
||||||||||||||||
other | - | 要移动的另一 basic_ospanstream
|
异常
可能会抛出由实现定义的异常。
示例
本节未完成 原因:暂无示例 |
参阅
(C++23)
|
构造 basic_spanbuf 对象 ( std::basic_spanbuf<CharT,Traits>
的公开成员函数) |