tmp/tmpbqxgp2c9/{from.md → to.md}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
#### Overridden virtual functions <a id="stringbuf.virtuals">[[stringbuf.virtuals]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
int_type underflow();
|
| 5 |
```
|
| 6 |
|
| 7 |
*Returns:* If the input sequence has a read position available, returns
|
| 8 |
`traits::to_int_type(*gptr())`. Otherwise, returns `traits::eof()`. Any
|
| 9 |
character in the underlying buffer which has been initialized is
|
| 10 |
considered to be part of the input sequence.
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
-
int_type pbackfail(int_type c = traits::eof());
|
| 14 |
```
|
| 15 |
|
| 16 |
*Effects:* Puts back the character designated by `c` to the input
|
| 17 |
sequence, if possible, in one of three ways:
|
| 18 |
|
|
@@ -31,11 +31,11 @@ sequence, if possible, in one of three ways:
|
|
| 31 |
|
| 32 |
*Remarks:* If the function can succeed in more than one of these ways,
|
| 33 |
it is unspecified which way is chosen.
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
-
int_type overflow(int_type c = traits::eof());
|
| 37 |
```
|
| 38 |
|
| 39 |
*Effects:* Appends the character designated by `c` to the output
|
| 40 |
sequence, if possible, in one of two ways:
|
| 41 |
|
|
@@ -61,11 +61,11 @@ plus at least one additional write position. If
|
|
| 61 |
`egptr()` to point just past the new write position.
|
| 62 |
|
| 63 |
``` cpp
|
| 64 |
pos_type seekoff(off_type off, ios_base::seekdir way,
|
| 65 |
ios_base::openmode which
|
| 66 |
-
= ios_base::in | ios_base::out);
|
| 67 |
```
|
| 68 |
|
| 69 |
*Effects:* Alters the stream position within one of the controlled
|
| 70 |
sequences, if possible, as indicated in
|
| 71 |
Table [[tab:iostreams.seekoff.positioning]].
|
|
@@ -93,23 +93,24 @@ as indicated in Table [[tab:iostreams.newoff.values]].
|
|
| 93 |
| `way == ios_base::cur` | the next pointer minus the beginning pointer (`xnext - xbeg`). |
|
| 94 |
| `way == ios_base::end` | the high mark pointer minus the beginning pointer (`high_mark - xbeg`). |
|
| 95 |
|
| 96 |
|
| 97 |
If `(newoff + off) < 0`, or if `newoff + off` refers to an uninitialized
|
| 98 |
-
character (
|
| 99 |
-
|
| 100 |
-
|
| 101 |
|
| 102 |
*Returns:* `pos_type(newoff)`, constructed from the resultant offset
|
| 103 |
`newoff` (of type `off_type`), that stores the resultant stream
|
| 104 |
position, if possible. If the positioning operation fails, or if the
|
| 105 |
constructed object cannot represent the resultant stream position, the
|
| 106 |
return value is `pos_type(off_type(-1))`.
|
| 107 |
|
| 108 |
``` cpp
|
| 109 |
-
pos_type seekpos(pos_type sp,
|
| 110 |
-
|
|
|
|
| 111 |
```
|
| 112 |
|
| 113 |
*Effects:* Equivalent to `seekoff(off_type(sp), ios_base::beg, which)`.
|
| 114 |
|
| 115 |
*Returns:* `sp` to indicate success, or `pos_type(off_type(-1))` to
|
|
|
|
| 1 |
#### Overridden virtual functions <a id="stringbuf.virtuals">[[stringbuf.virtuals]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
int_type underflow() override;
|
| 5 |
```
|
| 6 |
|
| 7 |
*Returns:* If the input sequence has a read position available, returns
|
| 8 |
`traits::to_int_type(*gptr())`. Otherwise, returns `traits::eof()`. Any
|
| 9 |
character in the underlying buffer which has been initialized is
|
| 10 |
considered to be part of the input sequence.
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
+
int_type pbackfail(int_type c = traits::eof()) override;
|
| 14 |
```
|
| 15 |
|
| 16 |
*Effects:* Puts back the character designated by `c` to the input
|
| 17 |
sequence, if possible, in one of three ways:
|
| 18 |
|
|
|
|
| 31 |
|
| 32 |
*Remarks:* If the function can succeed in more than one of these ways,
|
| 33 |
it is unspecified which way is chosen.
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
+
int_type overflow(int_type c = traits::eof()) override;
|
| 37 |
```
|
| 38 |
|
| 39 |
*Effects:* Appends the character designated by `c` to the output
|
| 40 |
sequence, if possible, in one of two ways:
|
| 41 |
|
|
|
|
| 61 |
`egptr()` to point just past the new write position.
|
| 62 |
|
| 63 |
``` cpp
|
| 64 |
pos_type seekoff(off_type off, ios_base::seekdir way,
|
| 65 |
ios_base::openmode which
|
| 66 |
+
= ios_base::in | ios_base::out) override;
|
| 67 |
```
|
| 68 |
|
| 69 |
*Effects:* Alters the stream position within one of the controlled
|
| 70 |
sequences, if possible, as indicated in
|
| 71 |
Table [[tab:iostreams.seekoff.positioning]].
|
|
|
|
| 93 |
| `way == ios_base::cur` | the next pointer minus the beginning pointer (`xnext - xbeg`). |
|
| 94 |
| `way == ios_base::end` | the high mark pointer minus the beginning pointer (`high_mark - xbeg`). |
|
| 95 |
|
| 96 |
|
| 97 |
If `(newoff + off) < 0`, or if `newoff + off` refers to an uninitialized
|
| 98 |
+
character ([[stringbuf.members]]), the positioning operation fails.
|
| 99 |
+
Otherwise, the function assigns `xbeg + newoff + off` to the next
|
| 100 |
+
pointer `xnext`.
|
| 101 |
|
| 102 |
*Returns:* `pos_type(newoff)`, constructed from the resultant offset
|
| 103 |
`newoff` (of type `off_type`), that stores the resultant stream
|
| 104 |
position, if possible. If the positioning operation fails, or if the
|
| 105 |
constructed object cannot represent the resultant stream position, the
|
| 106 |
return value is `pos_type(off_type(-1))`.
|
| 107 |
|
| 108 |
``` cpp
|
| 109 |
+
pos_type seekpos(pos_type sp,
|
| 110 |
+
ios_base::openmode which
|
| 111 |
+
= ios_base::in | ios_base::out) override;
|
| 112 |
```
|
| 113 |
|
| 114 |
*Effects:* Equivalent to `seekoff(off_type(sp), ios_base::beg, which)`.
|
| 115 |
|
| 116 |
*Returns:* `sp` to indicate success, or `pos_type(off_type(-1))` to
|