tmp/tmpyd2jzyec/{from.md → to.md}
RENAMED
|
@@ -26,12 +26,12 @@ according to `mode`.
|
|
| 26 |
- otherwise `pptr() == pbase()` is `true`.
|
| 27 |
- If `ios_base::in` is set in `mode`, `eback()` points to `buf.front()`,
|
| 28 |
and `(gptr() == eback() && egptr() == eback() + buf.size())` is
|
| 29 |
`true`.
|
| 30 |
|
| 31 |
-
[*Note 1*: For efficiency reasons, stream buffer operations
|
| 32 |
-
|
| 33 |
`basic_stringbuf`, e.g., by writing to characters in the range
|
| 34 |
\[`buf.data() + buf.size()`, `buf.data() + buf.capacity()`). All
|
| 35 |
operations retrieving a `basic_string` from `buf` ensure that the
|
| 36 |
`basic_string` invariants hold on the returned value. — *end note*]
|
| 37 |
|
|
@@ -67,19 +67,19 @@ return basic_string<charT, traits, SAlloc>(view(), sa);
|
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
basic_string<charT, traits, Allocator> str() &&;
|
| 70 |
```
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
*Returns:* A `basic_string<charT, traits, Allocator>` object move
|
| 73 |
constructed from the `basic_stringbuf`’s underlying character sequence
|
| 74 |
in `buf`. This can be achieved by first adjusting `buf` to have the same
|
| 75 |
content as `view()`.
|
| 76 |
|
| 77 |
-
*Ensures:* The underlying character sequence `buf` is empty and
|
| 78 |
-
`pbase()`, `pptr()`, `epptr()`, `eback()`, `gptr()`, and `egptr()` are
|
| 79 |
-
initialized as if by calling `init_buf_ptrs()` with an empty `buf`.
|
| 80 |
-
|
| 81 |
``` cpp
|
| 82 |
basic_string_view<charT, traits> view() const noexcept;
|
| 83 |
```
|
| 84 |
|
| 85 |
Let `sv` be `basic_string_view<charT, traits>`.
|
|
|
|
| 26 |
- otherwise `pptr() == pbase()` is `true`.
|
| 27 |
- If `ios_base::in` is set in `mode`, `eback()` points to `buf.front()`,
|
| 28 |
and `(gptr() == eback() && egptr() == eback() + buf.size())` is
|
| 29 |
`true`.
|
| 30 |
|
| 31 |
+
[*Note 1*: For efficiency reasons, stream buffer operations can violate
|
| 32 |
+
invariants of `buf` while it is held encapsulated in the
|
| 33 |
`basic_stringbuf`, e.g., by writing to characters in the range
|
| 34 |
\[`buf.data() + buf.size()`, `buf.data() + buf.capacity()`). All
|
| 35 |
operations retrieving a `basic_string` from `buf` ensure that the
|
| 36 |
`basic_string` invariants hold on the returned value. — *end note*]
|
| 37 |
|
|
|
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
basic_string<charT, traits, Allocator> str() &&;
|
| 70 |
```
|
| 71 |
|
| 72 |
+
*Ensures:* The underlying character sequence `buf` is empty and
|
| 73 |
+
`pbase()`, `pptr()`, `epptr()`, `eback()`, `gptr()`, and `egptr()` are
|
| 74 |
+
initialized as if by calling `init_buf_ptrs()` with an empty `buf`.
|
| 75 |
+
|
| 76 |
*Returns:* A `basic_string<charT, traits, Allocator>` object move
|
| 77 |
constructed from the `basic_stringbuf`’s underlying character sequence
|
| 78 |
in `buf`. This can be achieved by first adjusting `buf` to have the same
|
| 79 |
content as `view()`.
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
``` cpp
|
| 82 |
basic_string_view<charT, traits> view() const noexcept;
|
| 83 |
```
|
| 84 |
|
| 85 |
Let `sv` be `basic_string_view<charT, traits>`.
|