From Jason Turner

[spanbuf.members]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpd361d5a9/{from.md → to.md} +31 -0
tmp/tmpd361d5a9/{from.md → to.md} RENAMED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Member functions <a id="spanbuf.members">[[spanbuf.members]]</a>
2
+
3
+ ``` cpp
4
+ std::span<charT> span() const noexcept;
5
+ ```
6
+
7
+ *Returns:* If `ios_base::out` is set in *mode*, returns
8
+ `std::span<charT>(pbase(), pptr())`, otherwise returns *buf*.
9
+
10
+ [*Note 1*: In contrast to `basic_stringbuf`, the underlying sequence
11
+ never grows and is not owned. An owning copy can be obtained by
12
+ converting the result to `basic_string<charT>`. — *end note*]
13
+
14
+ ``` cpp
15
+ void span(std::span<charT> s) noexcept;
16
+ ```
17
+
18
+ *Effects:* *`buf`*` = s`. Initializes the input and output sequences
19
+ according to *mode*.
20
+
21
+ *Ensures:*
22
+
23
+ - If `ios_base::out` is set in *mode*,
24
+ `pbase() == s.data() && epptr() == pbase() + s.size()` is `true`;
25
+ - in addition, if `ios_base::ate` is set in *mode*,
26
+ `pptr() == pbase() + s.size()` is `true`,
27
+ - otherwise `pptr() == pbase()` is `true`.
28
+ - If `ios_base::in` is set in *mode*,
29
+ `eback() == s.data() && gptr() == eback() && egptr() == eback() + s.size()`
30
+ is `true`.
31
+