Init
This commit is contained in:
34
cppdraft/ospanstream/cons.md
Normal file
34
cppdraft/ospanstream/cons.md
Normal file
@@ -0,0 +1,34 @@
|
||||
[ospanstream.cons]
|
||||
|
||||
# 31 Input/output library [[input.output]](./#input.output)
|
||||
|
||||
## 31.9 Span-based streams [[span.streams]](span.streams#ospanstream.cons)
|
||||
|
||||
### 31.9.5 Class template basic_ospanstream [[ospanstream]](ospanstream#cons)
|
||||
|
||||
#### 31.9.5.2 Constructors [ospanstream.cons]
|
||||
|
||||
[ð](#lib:basic_ospanstream,constructor)
|
||||
|
||||
`explicit basic_ospanstream(std::span<charT> s,
|
||||
ios_base::openmode which = ios_base::out);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10635)
|
||||
|
||||
*Effects*: Initializes the base class withbasic_ostream<charT, traits>(addressof(*sb*)) and *sb* withbasic_spanbuf<charT, traits>(s, which | ios_base::out) ([[spanbuf.cons]](spanbuf.cons "31.9.3.2 Constructors"))[.](#1.sentence-1)
|
||||
|
||||
[ð](#lib:basic_ospanstream,constructor_)
|
||||
|
||||
`basic_ospanstream(basic_ospanstream&& rhs) noexcept;
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10649)
|
||||
|
||||
*Effects*: Initializes the base class with std::move(rhs) and *sb* with std::move(rhs.*sb*)[.](#2.sentence-1)
|
||||
|
||||
Next, basic_ostream<charT, traits>::set_rdbuf(addressof(*sb*)) is called to install the contained basic_spanbuf[.](#2.sentence-2)
|
||||
21
cppdraft/ospanstream/general.md
Normal file
21
cppdraft/ospanstream/general.md
Normal file
@@ -0,0 +1,21 @@
|
||||
[ospanstream.general]
|
||||
|
||||
# 31 Input/output library [[input.output]](./#input.output)
|
||||
|
||||
## 31.9 Span-based streams [[span.streams]](span.streams#ospanstream.general)
|
||||
|
||||
### 31.9.5 Class template basic_ospanstream [[ospanstream]](ospanstream#general)
|
||||
|
||||
#### 31.9.5.1 General [ospanstream.general]
|
||||
|
||||
[ð](#lib:basic_ospanstream)
|
||||
|
||||
namespace std {template<class charT, class traits = char_traits<charT>>class basic_ospanstream : public basic_ostream<charT, traits> {public:using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; using off_type = typename traits::off_type; using traits_type = traits; // [[ospanstream.cons]](ospanstream.cons "31.9.5.2 Constructors"), constructorsexplicit basic_ospanstream(std::span<charT> s,
|
||||
ios_base::openmode which = ios_base::out);
|
||||
basic_ospanstream(const basic_ospanstream&) = delete;
|
||||
basic_ospanstream(basic_ospanstream&& rhs);
|
||||
|
||||
basic_ospanstream& operator=(const basic_ospanstream&) = delete;
|
||||
basic_ospanstream& operator=(basic_ospanstream&& rhs); // [[ospanstream.swap]](ospanstream.swap "31.9.5.3 Swap"), swapvoid swap(basic_ospanstream& rhs); // [[ospanstream.members]](ospanstream.members "31.9.5.4 Member functions"), member functions basic_spanbuf<charT, traits>* rdbuf() const noexcept;
|
||||
|
||||
std::span<charT> span() const noexcept; void span(std::span<charT> s) noexcept; private: basic_spanbuf<charT, traits> *sb*; // *exposition only*};}
|
||||
42
cppdraft/ospanstream/members.md
Normal file
42
cppdraft/ospanstream/members.md
Normal file
@@ -0,0 +1,42 @@
|
||||
[ospanstream.members]
|
||||
|
||||
# 31 Input/output library [[input.output]](./#input.output)
|
||||
|
||||
## 31.9 Span-based streams [[span.streams]](span.streams#ospanstream.members)
|
||||
|
||||
### 31.9.5 Class template basic_ospanstream [[ospanstream]](ospanstream#members)
|
||||
|
||||
#### 31.9.5.4 Member functions [ospanstream.members]
|
||||
|
||||
[ð](#lib:rdbuf,basic_ospanstream)
|
||||
|
||||
`basic_spanbuf<charT, traits>* rdbuf() const noexcept;
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10694)
|
||||
|
||||
*Effects*: Equivalent to:return const_cast<basic_spanbuf<charT, traits>*>(addressof(*sb*));
|
||||
|
||||
[ð](#lib:span,basic_ospanstream)
|
||||
|
||||
`std::span<charT> span() const noexcept;
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10708)
|
||||
|
||||
*Effects*: Equivalent to: return rdbuf()->span();
|
||||
|
||||
[ð](#lib:span,basic_ospanstream_)
|
||||
|
||||
`void span(std::span<charT> s) noexcept;
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10719)
|
||||
|
||||
*Effects*: Equivalent to rdbuf()->span(s)[.](#3.sentence-1)
|
||||
32
cppdraft/ospanstream/swap.md
Normal file
32
cppdraft/ospanstream/swap.md
Normal file
@@ -0,0 +1,32 @@
|
||||
[ospanstream.swap]
|
||||
|
||||
# 31 Input/output library [[input.output]](./#input.output)
|
||||
|
||||
## 31.9 Span-based streams [[span.streams]](span.streams#ospanstream.swap)
|
||||
|
||||
### 31.9.5 Class template basic_ospanstream [[ospanstream]](ospanstream#swap)
|
||||
|
||||
#### 31.9.5.3 Swap [ospanstream.swap]
|
||||
|
||||
[ð](#lib:swap,basic_ospanstream)
|
||||
|
||||
`void swap(basic_ospanstream& rhs);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10665)
|
||||
|
||||
*Effects*: Equivalent to:basic_ostream<charT, traits>::swap(rhs);*sb*.swap(rhs.*sb*);
|
||||
|
||||
[ð](#lib:swap,basic_ospanstream_)
|
||||
|
||||
`template<class charT, class traits>
|
||||
void swap(basic_ospanstream<charT, traits>& x, basic_ospanstream<charT, traits>& y);
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10681)
|
||||
|
||||
*Effects*: Equivalent to x.swap(y)[.](#2.sentence-1)
|
||||
Reference in New Issue
Block a user