From Jason Turner

[stringbuf.virtuals]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8oow5n9c/{from.md → to.md} +21 -22
tmp/tmp8oow5n9c/{from.md → to.md} RENAMED
@@ -25,11 +25,11 @@ sequence, if possible, in one of three ways:
25
  `ios_base::out` is nonzero, assigns `c` to `*``gptr()`. Returns: `c`.
26
  - If `traits::eq_int_type(c, traits::eof())` returns `true` and if the
27
  input sequence has a putback position available, assigns `gptr() - 1`
28
  to `gptr()`. Returns: `traits::not_eof(c)`.
29
 
30
- *Returns:* `traits::eof()` to indicate failure.
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
@@ -48,56 +48,55 @@ sequence, if possible, in one of two ways:
48
  `traits::eof()`.
49
 
50
  *Remarks:* The function can alter the number of write positions
51
  available as a result of any call.
52
 
53
- *Returns:* `traits::eof()` to indicate failure.
54
 
55
- The function can make a write position available only if
56
- `(mode & ios_base::out) != 0`. To make a write position available, the
57
- function reallocates (or initially allocates) an array object with a
58
- sufficient number of elements to hold the current array object (if any),
59
- plus at least one additional write position. If
60
- `(mode & ios_base::in) != 0`, the function alters the read end pointer
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]].
72
 
73
- **Table: `seekoff` positioning** <a id="tab:iostreams.seekoff.positioning">[tab:iostreams.seekoff.positioning]</a>
74
 
75
  | Conditions | Result |
76
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
77
- | `(which & ios_base::in)`` == ios_base::in` | positions the input sequence |
78
- | `(which & ios_base::out)`` == ios_base::out` | positions the output sequence |
79
- | `(which & (ios_base::in |`<br> `ios_base::out)) ==`<br> `(ios_base::in) |`<br> `ios_base::out))`<br> and `way ==` either<br> `ios_base::beg` or<br> `ios_base::end` | positions both the input and the output sequences |
80
  | Otherwise | the positioning operation fails. |
81
 
82
 
83
- For a sequence to be positioned, if its next pointer (either `gptr()` or
84
- `pptr()`) is a null pointer and the new offset `newoff` is nonzero, the
85
- positioning operation fails. Otherwise, the function determines `newoff`
86
- as indicated in Table  [[tab:iostreams.newoff.values]].
87
 
88
- **Table: `newoff` values** <a id="tab:iostreams.newoff.values">[tab:iostreams.newoff.values]</a>
89
 
90
  | Condition | `newoff` Value |
91
  | ---------------------- | ----------------------------------------------------------------------- |
92
  | `way == ios_base::beg` | 0 |
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
 
25
  `ios_base::out` is nonzero, assigns `c` to `*``gptr()`. Returns: `c`.
26
  - If `traits::eq_int_type(c, traits::eof())` returns `true` and if the
27
  input sequence has a putback position available, assigns `gptr() - 1`
28
  to `gptr()`. Returns: `traits::not_eof(c)`.
29
 
30
+ *Returns:* As specified above, or `traits::eof()` to indicate failure.
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
 
48
  `traits::eof()`.
49
 
50
  *Remarks:* The function can alter the number of write positions
51
  available as a result of any call.
52
 
53
+ *Returns:* As specified above, or `traits::eof()` to indicate failure.
54
 
55
+ The function can make a write position available only if `ios_base::out`
56
+ is set in `mode`. To make a write position available, the function
57
+ reallocates (or initially allocates) an array object with a sufficient
58
+ number of elements to hold the current array object (if any), plus at
59
+ least one additional write position. If `ios_base::in` is set in `mode`,
60
+ the function alters the read end pointer `egptr()` to point just past
61
+ 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 [[stringbuf.seekoff.pos]].
 
71
 
72
+ **Table: `seekoff` positioning** <a id="stringbuf.seekoff.pos">[stringbuf.seekoff.pos]</a>
73
 
74
  | Conditions | Result |
75
+ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
76
+ | `ios_base::in` is set in `which` | positions the input sequence |
77
+ | `ios_base::out` is set in `which` | positions the output sequence |
78
+ | both `ios_base::in` and `ios_base::out` are set in `which` and either<br> `way == ios_base::beg` or<br> `way == ios_base::end` | positions both the input and the output sequences |
79
  | Otherwise | the positioning operation fails. |
80
 
81
 
82
+ For a sequence to be positioned, the function determines `newoff` as
83
+ indicated in [[stringbuf.seekoff.newoff]]. If the sequence’s next
84
+ pointer (either `gptr()` or `pptr()`) is a null pointer and `newoff` is
85
+ nonzero, the positioning operation fails.
86
 
87
+ **Table: `newoff` values** <a id="stringbuf.seekoff.newoff">[stringbuf.seekoff.newoff]</a>
88
 
89
  | Condition | `newoff` Value |
90
  | ---------------------- | ----------------------------------------------------------------------- |
91
  | `way == ios_base::beg` | 0 |
92
  | `way == ios_base::cur` | the next pointer minus the beginning pointer (`xnext - xbeg`). |
93
  | `way == ios_base::end` | the high mark pointer minus the beginning pointer (`high_mark - xbeg`). |
94
 
95
 
96
  If `(newoff + off) < 0`, or if `newoff + off` refers to an uninitialized
97
+ character [[stringbuf.members]], the positioning operation fails.
98
  Otherwise, the function assigns `xbeg + newoff + off` to the next
99
  pointer `xnext`.
100
 
101
  *Returns:* `pos_type(newoff)`, constructed from the resultant offset
102
  `newoff` (of type `off_type`), that stores the resultant stream