35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
[spanstream.cons]
|
||
|
||
# 31 Input/output library [[input.output]](./#input.output)
|
||
|
||
## 31.9 Span-based streams [[span.streams]](span.streams#spanstream.cons)
|
||
|
||
### 31.9.6 Class template basic_spanstream [[spanstream]](spanstream#cons)
|
||
|
||
#### 31.9.6.2 Constructors [spanstream.cons]
|
||
|
||
[ð](#lib:basic_spanstream,constructor)
|
||
|
||
`explicit basic_spanstream(std::span<charT> s,
|
||
ios_base::openmode which = ios_base::out | ios_bas::in);
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10774)
|
||
|
||
*Effects*: Initializes the base class withbasic_iostream<charT, traits>(addressof(*sb*)) and *sb* withbasic_spanbuf<charT, traits>(s, which) ([[spanbuf.cons]](spanbuf.cons "31.9.3.2 Constructors"))[.](#1.sentence-1)
|
||
|
||
[ð](#lib:basic_spanstream,constructor_)
|
||
|
||
`basic_spanstream(basic_spanstream&& rhs);
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10788)
|
||
|
||
*Effects*: Initializes the base class with std::move(rhs) and *sb* with std::move(rhs.*sb*)[.](#2.sentence-1)
|
||
|
||
Next, basic_iostream<charT, traits>::set_rdbuf(addressof(*sb*)) is called to install the contained basic_spanbuf[.](#2.sentence-2)
|